.golangci.yml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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. disabled-checks:
  18. - dupImport # https://github.com/go-critic/go-critic/issues/845
  19. - ifElseChain
  20. - octalLiteral
  21. - whyNoLint
  22. - wrapperFunc
  23. gocyclo:
  24. min-complexity: 15
  25. goimports:
  26. local-prefixes: github.com/Jguer/yay/v10
  27. golint:
  28. min-confidence: 0
  29. gomnd:
  30. settings:
  31. mnd:
  32. # don't include the "operation" and "assign"
  33. checks: argument,case,condition,return
  34. govet:
  35. check-shadowing: true
  36. lll:
  37. line-length: 140
  38. maligned:
  39. suggest-new: true
  40. misspell:
  41. locale: US
  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. - bodyclose
  48. - deadcode
  49. - depguard
  50. - dupl
  51. - errcheck
  52. - gochecknoinits
  53. - gocritic
  54. - gofmt
  55. - goimports
  56. - golint
  57. - goprintffuncname
  58. - gosec
  59. - gosimple
  60. - govet
  61. - ineffassign
  62. - interfacer
  63. - lll
  64. - misspell
  65. - nakedret
  66. - rowserrcheck
  67. - staticcheck
  68. - structcheck
  69. - stylecheck
  70. - typecheck
  71. - unconvert
  72. - unparam
  73. - unused
  74. - varcheck
  75. - whitespace
  76. - prealloc
  77. - maligned
  78. # disabled want to fix
  79. #- scopelint
  80. #- gomnd
  81. #- goconst
  82. #- gocyclo
  83. #- funlen
  84. #- dogsled
  85. # disabled for now
  86. # - godox
  87. issues:
  88. # Excluding configuration per-path, per-linter, per-text and per-source
  89. exclude-rules:
  90. - path: _test\.go
  91. linters:
  92. - gomnd
  93. exclude:
  94. - G204
  95. - commentedOutCode
  96. run:
  97. tests: false