.golangci.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. linters:
  2. # please, do not use `enable-all`: it's deprecated and will be removed soon.
  3. # inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
  4. disable-all: true
  5. enable:
  6. - bodyclose
  7. - deadcode
  8. - depguard
  9. - dogsled
  10. - dupl
  11. - errcheck
  12. - funlen
  13. - goconst
  14. # - gocritic
  15. - gocyclo
  16. - gofmt
  17. - goimports
  18. - golint
  19. - goprintffuncname
  20. - gosimple
  21. - govet
  22. - ineffassign
  23. - interfacer
  24. - misspell
  25. - nolintlint
  26. - rowserrcheck
  27. - scopelint
  28. - staticcheck
  29. - structcheck
  30. - stylecheck
  31. - typecheck
  32. - unconvert
  33. - unparam
  34. - unused
  35. - varcheck
  36. - whitespace
  37. issues:
  38. include:
  39. - EXC0002 # disable excluding of issues about comments from golint
  40. exclude-rules:
  41. - linters:
  42. - stylecheck
  43. text: "ST1000:"
  44. # Excluding configuration per-path, per-linter, per-text and per-source
  45. - path: _test\.go
  46. linters:
  47. - gomnd
  48. # https://github.com/go-critic/go-critic/issues/926
  49. - linters:
  50. - gocritic
  51. text: "unnecessaryDefer:"
  52. linters-settings:
  53. funlen:
  54. lines: 66
  55. statements: 50
  56. #issues:
  57. # include:
  58. # - EXC0002 # disable excluding of issues about comments from golint
  59. # exclude-rules:
  60. # - linters:
  61. # - stylecheck
  62. # text: "ST1000:"