.golangci.yml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. linters-settings:
  2. dupl:
  3. threshold: 100
  4. funlen:
  5. lines: 100
  6. statements: 50
  7. goconst:
  8. min-len: 3
  9. min-occurrences: 4
  10. gocritic:
  11. enabled-tags:
  12. - diagnostic
  13. - experimental
  14. - opinionated
  15. - performance
  16. - style
  17. gocyclo:
  18. min-complexity: 15
  19. goimports:
  20. local-prefixes: github.com/Jguer/yay/v12
  21. gomnd:
  22. checks:
  23. - argument
  24. - case
  25. - condition
  26. - return
  27. ignored-numbers:
  28. - "0"
  29. - "1"
  30. - "2"
  31. - "3"
  32. ignored-functions:
  33. - strings.SplitN
  34. govet:
  35. check-shadowing: true
  36. lll:
  37. line-length: 140
  38. misspell:
  39. locale: US
  40. nolintlint:
  41. allow-unused: false # report any unused nolint directives
  42. require-explanation: false # don't require an explanation for nolint directives
  43. require-specific: false # don't require nolint directives to be specific about which linter is being skipped
  44. linters:
  45. # please, do not use `enable-all`: it's deprecated and will be removed soon.
  46. # inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
  47. disable-all: true
  48. enable:
  49. - forbidigo
  50. - bodyclose
  51. - dogsled
  52. - dupl
  53. - errorlint
  54. - errcheck
  55. - exportloopref
  56. # - funlen # TOFIX
  57. - gochecknoinits
  58. # - goconst # TOFIX
  59. - gocritic
  60. # - gocyclo # TOFIX
  61. - gofmt
  62. - goimports
  63. # - gomnd # TOFIX
  64. - goprintffuncname
  65. - gosec
  66. - gosimple
  67. - govet
  68. - ineffassign
  69. - lll
  70. - misspell
  71. - nakedret
  72. - noctx
  73. - nolintlint
  74. - staticcheck
  75. - stylecheck
  76. - typecheck
  77. - unconvert
  78. - unparam
  79. - unused
  80. - whitespace
  81. run:
  82. go: "1.20"
  83. timeout: "10m"
  84. forbidigo:
  85. forbid:
  86. - p: ^fmt\.Print.*$
  87. msg: Do not commit print statements.
  88. issues:
  89. exclude-rules:
  90. - path: (.+)_test.go
  91. linters:
  92. - lll
  93. - revive
  94. - wsl
  95. - govet
  96. - godot
  97. - errcheck
  98. - stylecheck
  99. - dupl
  100. - gocritic
  101. - gochecknoinits
  102. - errorlint
  103. exclude:
  104. - G204