.golangci.yml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. # This file contains configuration options for golangci-lint.
  2. # https://github.com/golangci/golangci-lint/blob/master/.golangci.reference.yml
  3. run:
  4. # Timeout for analysis.
  5. timeout: 5m
  6. linters:
  7. enable-all: true
  8. disable:
  9. - cyclop
  10. - copyloopvar
  11. - depguard
  12. - dupl
  13. - err113
  14. - errname
  15. - errorlint
  16. - exhaustive
  17. - exhaustruct
  18. - forcetypeassert
  19. - funlen
  20. - gochecknoglobals
  21. - gocognit
  22. - goconst
  23. - gocyclo
  24. - goerr113
  25. - gomnd
  26. - gosec
  27. - inamedparam
  28. - intrange
  29. - ireturn
  30. - maintidx
  31. - mnd
  32. - nakedret
  33. - nestif
  34. - nlreturn
  35. - noctx
  36. - nonamedreturns
  37. - paralleltest
  38. - testableexamples
  39. - testpackage
  40. - thelper
  41. - tparallel
  42. - unparam
  43. - usestdlibvars
  44. - varnamelen
  45. - wrapcheck
  46. - wsl
  47. # Deprecated linters
  48. - deadcode
  49. - exhaustivestruct
  50. - exportloopref
  51. - execinquery
  52. - golint
  53. - ifshort
  54. - interfacer
  55. - maligned
  56. - nosnakecase
  57. - scopelint
  58. - structcheck
  59. - varcheck
  60. linters-settings:
  61. revive:
  62. # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md
  63. rules:
  64. - name: indent-error-flow
  65. - name: use-any
  66. lll:
  67. line-length: 130
  68. stylecheck:
  69. checks: [
  70. "all",
  71. "-ST1000", # at least one file in a package should have a package comment
  72. ]
  73. gocritic:
  74. enabled-tags:
  75. - diagnostic
  76. - experimental
  77. - opinionated
  78. - performance
  79. - style
  80. disabled-checks:
  81. - deferInLoop
  82. - importShadow
  83. - sloppyReassign
  84. - unnamedResult
  85. - whyNoLint
  86. govet:
  87. enable-all: true
  88. disable:
  89. - fieldalignment
  90. - shadow
  91. issues:
  92. # Show all issues from a linter.
  93. max-issues-per-linter: 0
  94. # Show all issues with the same text.
  95. max-same-issues: 0
  96. include:
  97. - EXC0011 # include issues about comments from `stylecheck`
  98. exclude-rules:
  99. # Exclude some linters from running on tests files.
  100. - path: _test\.go
  101. linters:
  102. - lll