.golangci.yml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. linters-settings:
  2. dupl:
  3. threshold: 100
  4. funlen:
  5. lines: 100
  6. statements: 50
  7. goconst:
  8. min-len: 2
  9. min-occurrences: 2
  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/v9
  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. - dogsled
  51. - dupl
  52. - errcheck
  53. - funlen
  54. - gochecknoinits
  55. - goconst
  56. - gocritic
  57. - gocyclo
  58. - gofmt
  59. - goimports
  60. - golint
  61. - gomnd
  62. - goprintffuncname
  63. - gosec
  64. - gosimple
  65. - govet
  66. - ineffassign
  67. - interfacer
  68. - lll
  69. - misspell
  70. - nakedret
  71. - rowserrcheck
  72. - scopelint
  73. - staticcheck
  74. - structcheck
  75. - stylecheck
  76. - typecheck
  77. - unconvert
  78. - unparam
  79. - unused
  80. - varcheck
  81. - whitespace
  82. - godox
  83. - maligned
  84. - prealloc
  85. issues:
  86. # Excluding configuration per-path, per-linter, per-text and per-source
  87. exclude-rules:
  88. - path: _test\.go
  89. linters:
  90. - gomnd
  91. run:
  92. skip-dirs:
  93. - test/testdata_etc
  94. - internal/cache
  95. - internal/renameio
  96. - internal/robustio