.golangci.yml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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. - noinlineerr
  35. - nonamedreturns
  36. - paralleltest
  37. - testableexamples
  38. - testpackage
  39. - thelper
  40. - tparallel
  41. - unparam
  42. - usestdlibvars
  43. - varnamelen
  44. - wrapcheck
  45. - wsl
  46. - wsl_v5
  47. settings:
  48. gocritic:
  49. disabled-checks:
  50. - deferInLoop
  51. - importShadow
  52. - sloppyReassign
  53. - unnamedResult
  54. - whyNoLint
  55. enabled-tags:
  56. - diagnostic
  57. - experimental
  58. - opinionated
  59. - performance
  60. - style
  61. govet:
  62. disable:
  63. - fieldalignment
  64. - shadow
  65. enable-all: true
  66. lll:
  67. line-length: 130
  68. revive:
  69. rules:
  70. - name: indent-error-flow
  71. - name: use-any
  72. staticcheck:
  73. checks:
  74. - -ST1000
  75. - all
  76. exclusions:
  77. generated: lax
  78. presets:
  79. - common-false-positives
  80. - legacy
  81. - std-error-handling
  82. rules:
  83. - linters:
  84. - lll
  85. path: _test\.go
  86. paths:
  87. - third_party$
  88. - builtin$
  89. - examples$
  90. issues:
  91. max-issues-per-linter: 0
  92. max-same-issues: 0
  93. formatters:
  94. enable:
  95. - gci
  96. - gofmt
  97. - gofumpt
  98. - goimports
  99. exclusions:
  100. generated: lax
  101. paths:
  102. - third_party$
  103. - builtin$
  104. - examples$