.golangci.yml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. version: "2"
  2. linters:
  3. default: all
  4. disable:
  5. - copyloopvar
  6. - cyclop
  7. - depguard
  8. - dupl
  9. - err113
  10. - errname
  11. - errorlint
  12. - exhaustive
  13. - exhaustruct
  14. - forbidigo
  15. - forcetypeassert
  16. - funcorder
  17. - funlen
  18. - gochecknoglobals
  19. - gocognit
  20. - goconst
  21. - gocyclo
  22. - godox
  23. - gosec
  24. - gosmopolitan
  25. - inamedparam
  26. - intrange
  27. - ireturn
  28. - maintidx
  29. - mnd
  30. - nakedret
  31. - nestif
  32. - nlreturn
  33. - noctx
  34. - nonamedreturns
  35. - paralleltest
  36. - testableexamples
  37. - testpackage
  38. - thelper
  39. - tparallel
  40. - unparam
  41. - usestdlibvars
  42. - varnamelen
  43. - wrapcheck
  44. - wsl
  45. settings:
  46. gocritic:
  47. disabled-checks:
  48. - deferInLoop
  49. - importShadow
  50. - sloppyReassign
  51. - unnamedResult
  52. - whyNoLint
  53. enabled-tags:
  54. - diagnostic
  55. - experimental
  56. - opinionated
  57. - performance
  58. - style
  59. govet:
  60. disable:
  61. - fieldalignment
  62. - shadow
  63. enable-all: true
  64. lll:
  65. line-length: 130
  66. revive:
  67. rules:
  68. - name: indent-error-flow
  69. - name: use-any
  70. staticcheck:
  71. checks:
  72. - -ST1000
  73. - all
  74. exclusions:
  75. generated: lax
  76. presets:
  77. - common-false-positives
  78. - legacy
  79. - std-error-handling
  80. rules:
  81. - linters:
  82. - lll
  83. path: _test\.go
  84. paths:
  85. - third_party$
  86. - builtin$
  87. - examples$
  88. issues:
  89. max-issues-per-linter: 0
  90. max-same-issues: 0
  91. formatters:
  92. enable:
  93. - gci
  94. - gofmt
  95. - gofumpt
  96. - goimports
  97. exclusions:
  98. generated: lax
  99. paths:
  100. - third_party$
  101. - builtin$
  102. - examples$