This repository has been archived by the owner on Apr 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
golangci-linters.yaml
209 lines (209 loc) · 4.41 KB
/
golangci-linters.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
linters:
# Disable all linters.
# Default: false
# disable-all: true
# Enable specific linter
# https://golangci-lint.run/usage/linters/#enabled-by-default-linters
enable:
- asasalint
- asciicheck
- bidichk
- bodyclose
- containedctx
- contextcheck
- cyclop
- deadcode
- decorder
# - depguard
- dogsled
- dupl
- durationcheck
- errcheck
- errchkjson
- errname
# - errorlint # expects using `%w` to format errors.
- execinquery
- exhaustive
# - exhaustivestruct # expects all fields in a struct to be initialized
- exportloopref
- forbidigo
# - forcetypeassert # expects checking the result of type conversions
# - funlen # expects function length to be less than 60 lines.
- gochecknoglobals
- gochecknoinits
- gocognit
- goconst
# Consider enabling it.
# - gocritic # suggestions for simplifying the code.
- gocyclo
# - godot # expects comments to end in a period.
# - godox # Reports TODO/BUG/FIXME;
# - goerr113 # expects using wrapped static errors instead of dynamic errors.
- gofmt
# - gofumpt # expects files to be formatted with https://github.com/mvdan/gofumpt, which is stricter than gofmt.
- goheader
- goimports
# - gomnd # reports magic numbers (e.g., file permissions.)
- gomoddirectives
- gomodguard
- goprintffuncname
- gosec
- gosimple
- govet
- grouper
- importas
- ineffassign
# - lll # Line length: Would be nice to enable it later.
- maintidx
- makezero
- misspell
- nakedret
- nestif
- nilerr
- nilnil
# - nlreturn # expects some additional blank lines
- noctx
- nolintlint
- nonamedreturns
# - nosnakecase
- nosprintfhostport
# Might be nice to enable it later.
# - paralleltest
- prealloc
- predeclared
- promlinter
- revive
- rowserrcheck
- sqlclosecheck
- staticcheck
- structcheck
- stylecheck
# - tagliatelle
- tenv
# - testpackage
# - thelper # expects helper functions to start from t.Helper.
- tparallel
- typecheck
- unconvert
- unparam
- unused
- varcheck
- varnamelen
- wastedassign
- whitespace
# - wrapcheck # expects errors to be wrapped in additional message
# - wsl # expects additional new lines here and there.
# Enable all available linters.
# Default: false
# enable-all: true
# Disable specific linter
# https://golangci-lint.run/usage/linters/#disabled-by-default-linters--e--enable
disable:
# - asasalint
# - asciicheck
# - bidichk
# - bodyclose
# - containedctx
# - contextcheck
# - cyclop
# - deadcode
# - decorder
- depguard
# - dogsled
# - dupl
# - durationcheck
# - errcheck
# - errchkjson
# - errname
# - errorlint
# - execinquery
# - exhaustive
- exhaustivestruct
# - exportloopref
# - forbidigo
- forcetypeassert
- funlen
- gci
# - gochecknoglobals
# - gochecknoinits
# - gocognit
# - goconst
- gocritic
# - gocyclo
- godot
- godox
- goerr113
# - gofmt
- gofumpt
# - goheader
# - goimports
- gomnd
# - gomoddirectives
# - gomodguard
# - goprintffuncname
# - gosec
# - gosimple
# - govet
# - grouper
- ifshort
# - importas
# - ineffassign
- lll
# - maintidx
# - makezero
# - misspell
# - nakedret
# - nestif
# - nilerr
# - nilnil
- nlreturn
# - noctx
# - nolintlint
# - nonamedreturns
- nosnakecase
# - nosprintfhostport
- paralleltest
# - prealloc
# - predeclared
# - promlinter
# - revive
# - rowserrcheck
- scopelint
# - sqlclosecheck
# - staticcheck
# - structcheck
# - stylecheck
- tagliatelle
# - tenv
- testpackage
- thelper
# - tparallel
# - typecheck
# - unconvert
# - unparam
# - unused
# - varcheck
# - varnamelen
# - wastedassign
# - whitespace
- wrapcheck
- wsl
# Enable presets.
# https://golangci-lint.run/usage/linters
presets:
- bugs
- comment
- complexity
- error
- format
- import
- metalinter
- module
- performance
- sql
- style
- test
- unused
# Run only fast linters from enabled linters set (first run won't be fast)
# Default: false
fast: true