.golangci.yml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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. lll:
  35. line-length: 140
  36. misspell:
  37. locale: US
  38. nolintlint:
  39. allow-unused: false # report any unused nolint directives
  40. require-explanation: false # don't require an explanation for nolint directives
  41. require-specific: false # don't require nolint directives to be specific about which linter is being skipped
  42. linters:
  43. # please, do not use `enable-all`: it's deprecated and will be removed soon.
  44. # inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
  45. disable-all: true
  46. enable:
  47. - forbidigo
  48. - bodyclose
  49. - dogsled
  50. - dupl
  51. - errorlint
  52. - errcheck
  53. # - funlen # TOFIX
  54. - gochecknoinits
  55. # - goconst # TOFIX
  56. - gocritic
  57. # - gocyclo # TOFIX
  58. - gofmt
  59. - goimports
  60. # - gomnd # TOFIX
  61. - goprintffuncname
  62. - gosec
  63. - gosimple
  64. - govet
  65. - ineffassign
  66. - lll
  67. - misspell
  68. - nakedret
  69. - noctx
  70. - nolintlint
  71. - staticcheck
  72. - stylecheck
  73. - typecheck
  74. - unconvert
  75. - unparam
  76. - unused
  77. - whitespace
  78. run:
  79. go: "1.20"
  80. timeout: "10m"
  81. forbidigo:
  82. forbid:
  83. - p: ^fmt\.Print.*$
  84. msg: Do not commit print statements.
  85. issues:
  86. exclude-rules:
  87. - path: (.+)_test.go
  88. linters:
  89. - lll
  90. - revive
  91. - wsl
  92. - govet
  93. - godot
  94. - errcheck
  95. - stylecheck
  96. - dupl
  97. - gocritic
  98. - gochecknoinits
  99. - errorlint
  100. exclude:
  101. - G204