.golangci.yml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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/v11
  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. - bodyclose
  50. - depguard
  51. - dogsled
  52. - dupl
  53. - errcheck
  54. - exportloopref
  55. # - funlen # TOFIX
  56. - gochecknoinits
  57. # - goconst # TOFIX
  58. - gocritic
  59. # - gocyclo # TOFIX
  60. - gofmt
  61. - goimports
  62. # - gomnd # TOFIX
  63. - goprintffuncname
  64. - gosec
  65. - gosimple
  66. - govet
  67. - ineffassign
  68. - lll
  69. - misspell
  70. - nakedret
  71. - noctx
  72. - nolintlint
  73. - staticcheck
  74. - stylecheck
  75. - typecheck
  76. - unconvert
  77. - unparam
  78. - unused
  79. - whitespace
  80. run:
  81. go: '1.18'
  82. issues:
  83. exclude-rules:
  84. - path: _test\.go
  85. linters:
  86. - lll
  87. - revive
  88. - wsl
  89. - govet
  90. - godot
  91. - errcheck
  92. - stylecheck
  93. - dupl
  94. - gocritic
  95. - gochecknoinits
  96. exclude:
  97. - G204