@@ -39,7 +39,6 @@ linters:
39
39
- funlen # check for long functions
40
40
- gci # controls Go package import order and makes it always deterministic
41
41
- gocheckcompilerdirectives # checks that go compiler directive comments (//go:) are valid
42
- - gochecknoglobals # checks that no globals are used
43
42
- gochecksumtype # exhaustiveness checks on Go "sum types"
44
43
- gocognit # check for high cognitive complexity
45
44
- gocritic # Go source code linter that provides a ton of rules
@@ -122,6 +121,7 @@ linters:
122
121
- gomnd # deprecated
123
122
- mnd # too many detections
124
123
- cyclop # covered by gocyclo
124
+ - gochecknoglobals # there are many valid reasons for global variables, depending on the project
125
125
126
126
linters-settings :
127
127
wsl :
@@ -147,26 +147,30 @@ linters-settings:
147
147
ignore-map-index-ok : true
148
148
ignore-chan-recv-ok : true
149
149
ignore-decls :
150
- - n int
151
- - x int
152
- - y int
153
- - z int
154
- - i int
155
- - a int
156
- - b int
157
- - c int
158
- - j int
159
- - T any
160
- - a any
161
- - b any
162
- - c any
163
- - d any
164
- - data any
165
- - n any
166
- - f func()
167
- - cb func()
168
- - t testing.T
169
- - b testing.B
150
+ - n int # generic number
151
+ - x int # generic number (e.g. coordinate)
152
+ - y int # generic number (e.g. coordinate)
153
+ - z int # generic number (e.g. coordinate)
154
+ - i int # generic number
155
+ - a int # generic number
156
+ - r int # generic number (e.g. red or radius)
157
+ - g int # generic number (e.g. green)
158
+ - b int # generic number (e.g. blue)
159
+ - c int # generic number (e.g. count)
160
+ - j int # generic number (e.g. index)
161
+ - T any # generic type
162
+ - a any # generic any (e.g. data)
163
+ - b any # generic any (e.g. body)
164
+ - c any # generic any
165
+ - d any # generic any (e.g. data)
166
+ - data any # generic data
167
+ - n any # generic any
168
+ - t time.Time # often used as a variable name
169
+ - f func() # often used as a callback variable name
170
+ - cb func() # often used as a callback variable name
171
+ - t testing.T # default testing.T variable name
172
+ - b testing.B # default testing.B variable name
173
+ - sb strings.Builder # often used as a variable name
170
174
171
175
issues :
172
176
exclude-rules :
0 commit comments