.golangci.yml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. - diagnostic
  40. disabled-checks:
  41. - commentFormatting
  42. - commentedOutCode
  43. - evalOrder
  44. - hugeParam
  45. - octalLiteral
  46. - rangeValCopy
  47. - tooManyResultsChecker
  48. - unnamedResult
  49. linters:
  50. disable-all: true
  51. enable:
  52. - deadcode
  53. - gocritic
  54. - gofmt
  55. - gosimple
  56. - govet
  57. - ineffassign
  58. - misspell
  59. - revive
  60. - staticcheck
  61. - unused
  62. run:
  63. skip-dirs:
  64. - pkg
  65. issues:
  66. exclude:
  67. - can't lint
  68. - declaration of "err" shadows declaration at line
  69. - should have a package comment, unless it's in another file for this package
  70. - error strings should not be capitalized or end with punctuation or a newline
  71. - Wrapf call needs 1 arg but has 2 args
  72. - cs.NegotiatedProtocolIsMutual is deprecated