Advertisement
gravitiq

Untitled

Jan 31st, 2025
11
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.52 KB | None | 0 0
  1. # supported golangci-lint version = 1.62.2
  2. run:
  3. # Number of operating system threads (`GOMAXPROCS`) that can execute golangci-lint simultaneously.
  4. # If it is explicitly set to 0 (i.e. not the default) then golangci-lint will automatically set the value to match Linux container CPU quota.
  5. # Default: the number of logical CPUs in the machine
  6. concurrency: 0
  7. timeout: 3m
  8.  
  9. linters:
  10. disable-all: true
  11. enable:
  12. - asasalint
  13. - asciicheck
  14. - bidichk
  15. - bodyclose
  16. - canonicalheader
  17. - containedctx
  18. - contextcheck
  19. - copyloopvar
  20. - cyclop
  21. - decorder
  22. - dogsled
  23. - dupword
  24. - durationcheck
  25. - errcheck
  26. - errchkjson
  27. - errname
  28. - errorlint
  29. - exhaustive
  30. - fatcontext
  31. - forbidigo
  32. - forcetypeassert
  33. - gci
  34. - ginkgolinter
  35. - gocheckcompilerdirectives
  36. - gochecknoglobals
  37. - gochecknoinits
  38. - gochecksumtype
  39. - gocognit
  40. - goconst
  41. - gocritic
  42. - gocyclo
  43. - godot
  44. - godox
  45. - gofmt
  46. - gofumpt
  47. - goheader
  48. - goimports
  49. - gomoddirectives
  50. - gomodguard
  51. - goprintffuncname
  52. - gosec
  53. - gosimple
  54. - gosmopolitan
  55. - govet
  56. - grouper
  57. - iface
  58. - importas
  59. - inamedparam
  60. - ineffassign
  61. - interfacebloat
  62. - ireturn
  63. - loggercheck
  64. - maintidx
  65. - makezero
  66. - mirror
  67. - misspell
  68. - musttag
  69. - nakedret
  70. - nestif
  71. - nilerr
  72. - nilnil
  73. - nlreturn
  74. - noctx
  75. - nolintlint
  76. - nosprintfhostport
  77. - paralleltest
  78. - perfsprint
  79. - prealloc
  80. - predeclared
  81. - promlinter
  82. - protogetter
  83. - reassign
  84. - recvcheck
  85. - revive
  86. - rowserrcheck
  87. - sloglint
  88. - spancheck
  89. - sqlclosecheck
  90. - staticcheck
  91. - stylecheck
  92. - tagalign
  93. - tagliatelle
  94. - tenv
  95. - testableexamples
  96. - testifylint
  97. - thelper
  98. - tparallel
  99. - unconvert
  100. - unparam
  101. - unused
  102. - usestdlibvars
  103. - wastedassign
  104. - whitespace
  105. - wsl
  106. - zerologlint
  107.  
  108. output:
  109. # Default: false
  110. sort-results: true
  111. # Default: ["file"]
  112. sort-order:
  113. - linter
  114. - file
  115.  
  116. linters-settings:
  117. ireturn:
  118. allow:
  119. - anon
  120. - error
  121. - empty
  122. - stdlib
  123. - Opt
  124. - TextMapPropagator
  125. - Span
  126.  
  127. nolintlint:
  128. # Enable to require nolint directives to mention the specific linter being suppressed.
  129. # Default: false
  130. require-specific: true
  131.  
  132. tagliatelle:
  133. # Checks the struct tag name case.
  134. case:
  135. rules:
  136. json: snake
  137. yaml: snake
  138. xml: snake
  139. toml: snake
  140. bson: snake
  141. avro: snake
  142. mapstructure: snake
  143. env: snake
  144. # env: upperSnake
  145. envconfig: upperSnake
  146. whatever: snake
  147.  
  148.  
  149. revive:
  150. enable-all-rules: true
  151. rules:
  152. - name: unexported-return
  153. disabled: true
  154. - name: line-length-limit
  155. disabled: true
  156. - name: add-constant
  157. disabled: true
  158. - name: unhandled-error
  159. disabled: true
  160. - name: comment-spacings
  161. disabled: true
  162. - name: var-naming
  163. disabled: true
  164. - name: nested-structs
  165. disabled: true
  166. - name: max-public-structs
  167. disabled: true
  168. - name: function-length
  169. disabled: true
  170. - name: import-shadowing
  171. disabled: true
  172. - name: import-alias-naming
  173. disabled: true
  174. - name: empty-block
  175. disabled: true
  176. - name: confusing-naming
  177. disabled: true
  178. - name: exported
  179. disabled: true
  180. - name: unused-receiver
  181. disabled: true
  182. - name: indent-error-flow
  183. disabled: true
  184. - name: early-return
  185. disabled: true
  186. - name: use-any
  187. disabled: true
  188. - name: argument-limit
  189. disabled: true
  190. - name: cognitive-complexity
  191. disabled: true
  192. - name: cyclomatic
  193. arguments:
  194. - 15
  195. - name: confusing-naming
  196. disabled: true
  197. - name: deep-exit
  198. disabled: true
  199.  
  200. gosimple:
  201. checks:
  202. - "all"
  203. - "-S1008"
  204.  
  205. stylecheck:
  206. checks:
  207. - "all"
  208. - "-ST1003" # Poorly chosen identifier. Like camel_case
  209.  
  210. nestif:
  211. min-complexity: 7
  212.  
  213. cyclop:
  214. # Default: 10
  215. max-complexity: 15
  216.  
  217. gocritic:
  218. enable-all: true
  219. disabled-checks:
  220. - hugeParam
  221. - rangeValCopy
  222. - importShadow
  223.  
  224. wsl:
  225. allow-trailing-comment: true
  226. issues:
  227. max-same-issues: 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement