.golangci.yml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. - depguard
  11. - dupl
  12. - errname
  13. - errorlint
  14. - exhaustive
  15. - exhaustruct
  16. - forcetypeassert
  17. - funlen
  18. - gochecknoglobals
  19. - gocognit
  20. - goconst
  21. - gocyclo
  22. - goerr113
  23. - gomnd
  24. - gosec
  25. - inamedparam
  26. - ireturn
  27. - maintidx
  28. - nakedret
  29. - nestif
  30. - nlreturn
  31. - noctx
  32. - nonamedreturns
  33. - paralleltest
  34. - perfsprint
  35. - testableexamples
  36. - testpackage
  37. - thelper
  38. - tparallel
  39. - unparam
  40. - usestdlibvars
  41. - varnamelen
  42. - wrapcheck
  43. - wsl
  44. # Deprecated linters
  45. - deadcode
  46. - exhaustivestruct
  47. - golint
  48. - ifshort
  49. - interfacer
  50. - maligned
  51. - nosnakecase
  52. - scopelint
  53. - structcheck
  54. - varcheck
  55. linters-settings:
  56. revive:
  57. # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md
  58. rules:
  59. - name: use-any
  60. lll:
  61. line-length: 130
  62. stylecheck:
  63. checks: [
  64. "all",
  65. "-ST1000", # at least one file in a package should have a package comment
  66. ]
  67. gocritic:
  68. enabled-checks:
  69. - emptyStringTest
  70. issues:
  71. # Show all issues from a linter.
  72. max-issues-per-linter: 0
  73. # Show all issues with the same text.
  74. max-same-issues: 0
  75. include:
  76. - EXC0011 # include issues about comments from `stylecheck`
  77. exclude-rules:
  78. # Exclude some linters from running on tests files.
  79. - path: _test\.go
  80. linters:
  81. - lll