.golangci.yml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. linters-settings:
  2. govet:
  3. check-shadowing: true
  4. settings:
  5. printf:
  6. funcs:
  7. - (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
  8. - (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
  9. - (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
  10. - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
  11. revive:
  12. min-confidence: 0
  13. gocyclo:
  14. min-complexity: 10
  15. maligned:
  16. suggest-new: true
  17. dupl:
  18. threshold: 100
  19. goconst:
  20. min-len: 2
  21. min-occurrences: 2
  22. depguard:
  23. list-type: blacklist
  24. packages:
  25. # logging is allowed only by logutils.Log, logrus
  26. # is allowed to use only in logutils package
  27. - github.com/sirupsen/logrus
  28. misspell:
  29. locale: US
  30. lll:
  31. line-length: 140
  32. goimports:
  33. local-prefixes: github.com/golangci/golangci-lint
  34. gocritic:
  35. enabled-tags:
  36. - performance
  37. - style
  38. - experimental
  39. disabled-checks:
  40. - wrapperFunc
  41. - dupImport # https://github.com/go-critic/go-critic/issues/845
  42. linters:
  43. disable-all: true
  44. enable:
  45. - gofmt
  46. - revive
  47. - govet
  48. - misspell
  49. - ineffassign
  50. - deadcode
  51. - staticcheck
  52. - unused
  53. - gosimple
  54. run:
  55. skip-dirs:
  56. - pkg
  57. issues:
  58. exclude:
  59. - can't lint
  60. - declaration of "err" shadows declaration at line
  61. - should have a package comment, unless it's in another file for this package
  62. - error strings should not be capitalized or end with punctuation or a newline
  63. - Wrapf call needs 1 arg but has 2 args
  64. - cs.NegotiatedProtocolIsMutual is deprecated
  65. # golangci.com configuration
  66. # https://github.com/golangci/golangci/wiki/Configuration
  67. service:
  68. golangci-lint-version: 1.19.x # use the fixed version to not introduce new linters unexpectedly
  69. prepare:
  70. - echo "here I can run custom commands, but no preparation needed for this repo"