.golangci.yml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. run:
  2. concurrency: 2
  3. timeout: 10m
  4. linters:
  5. enable-all: false
  6. disable-all: true
  7. enable:
  8. - depguard
  9. - errcheck
  10. - gocritic
  11. - gocyclo
  12. - gofmt
  13. - goimports
  14. - gomodguard
  15. - revive
  16. - gosimple
  17. - govet
  18. - ineffassign
  19. - lll
  20. - misspell
  21. - nakedret
  22. - nolintlint
  23. - staticcheck
  24. - typecheck
  25. - unconvert
  26. - unparam
  27. - unused
  28. linters-settings:
  29. revive:
  30. rules:
  31. - name: package-comments
  32. disabled: true
  33. depguard:
  34. list-type: denylist
  35. include-go-root: true
  36. packages:
  37. # The io/ioutil package has been deprecated.
  38. # https://go.dev/doc/go1.16#ioutil
  39. - io/ioutil
  40. gomodguard:
  41. blocked:
  42. versions:
  43. - gotest.tools:
  44. version: "< 3.0.0"
  45. reason: "deprecated, pre-modules version"
  46. gocritic:
  47. # Enable multiple checks by tags, run `GL_DEBUG=gocritic golangci-lint run` to see all tags and checks.
  48. # Empty list by default. See https://github.com/go-critic/go-critic#usage -> section "Tags".
  49. enabled-tags:
  50. - diagnostic
  51. - opinionated
  52. - style
  53. disabled-checks:
  54. - paramTypeCombine
  55. - unnamedResult
  56. - whyNoLint
  57. gocyclo:
  58. min-complexity: 16
  59. lll:
  60. line-length: 200
  61. issues:
  62. # golangci hides some golint warnings (the warning about exported things
  63. # withtout documentation for example), this will make it show them anyway.
  64. exclude-use-default: false
  65. exclude:
  66. - should not use dot imports