@@ -175,148 +175,74 @@ linters-settings:
175
175
# This means that linting errors with less than 0.8 confidence will be ignored.
176
176
# Default: 0.8
177
177
confidence : 0.01
178
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md
178
179
rules :
179
- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#blank-imports
180
180
- name : blank-imports
181
- disabled : false
182
- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#bool-literal-in-expr
183
181
- name : bool-literal-in-expr
184
- disabled : false
185
- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#constant-logical-expr
186
182
- name : constant-logical-expr
187
- disabled : false
188
- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#context-as-argument
189
- # TODO (#3372) re-enable linter when it is compatible. https://github.com/golangci/golangci-lint/issues/3280
190
183
- name : context-as-argument
191
- disabled : true
192
184
arguments :
193
- allowTypesBefore : " *testing.T"
194
- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#context-keys-type
185
+ - allowTypesBefore : " *testing.T"
195
186
- name : context-keys-type
196
- disabled : false
197
- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#deep-exit
198
187
- name : deep-exit
199
- disabled : false
200
- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#defer
201
188
- name : defer
202
- disabled : false
203
189
arguments :
204
190
- ["call-chain", "loop"]
205
- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#dot-imports
206
191
- name : dot-imports
207
- disabled : false
208
- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#duplicated-imports
209
192
- name : duplicated-imports
210
- disabled : false
211
- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#early-return
212
193
- name : early-return
213
- disabled : false
214
- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#empty-block
194
+ arguments :
195
+ - " preserveScope "
215
196
- name : empty-block
216
- disabled : false
217
- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#empty-lines
218
197
- name : empty-lines
219
- disabled : false
220
- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-naming
221
198
- name : error-naming
222
- disabled : false
223
- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-return
224
199
- name : error-return
225
- disabled : false
226
- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-strings
227
200
- name : error-strings
228
- disabled : false
229
- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#errorf
230
201
- name : errorf
231
- disabled : false
232
- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#exported
233
202
- name : exported
234
- disabled : false
235
203
arguments :
236
204
- " sayRepetitiveInsteadOfStutters"
237
- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#flag-parameter
238
205
- name : flag-parameter
239
- disabled : false
240
- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#identical-branches
241
206
- name : identical-branches
242
- disabled : false
243
- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#if-return
244
207
- name : if-return
245
- disabled : false
246
- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#increment-decrement
208
+ - name : import-shadowing
247
209
- name : increment-decrement
248
- disabled : false
249
- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#indent-error-flow
250
210
- name : indent-error-flow
251
- disabled : false
252
- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#import-shadowing
253
- - name : import-shadowing
254
- disabled : false
255
- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#package-comments
211
+ arguments :
212
+ - " preserveScope"
256
213
- name : package-comments
257
- disabled : false
258
- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#range
259
214
- name : range
260
- disabled : false
261
- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#range-val-in-closure
262
215
- name : range-val-in-closure
263
- disabled : false
264
- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#range-val-address
265
216
- name : range-val-address
266
- disabled : false
267
- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#redefines-builtin-id
268
217
- name : redefines-builtin-id
269
- disabled : false
270
- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#string-format
271
218
- name : string-format
272
- disabled : false
273
219
arguments :
274
220
- - panic
275
221
- ' /^[^\n]*$/'
276
222
- must not contain line breaks
277
- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#struct-tag
278
223
- name : struct-tag
279
- disabled : false
280
- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#superfluous-else
281
224
- name : superfluous-else
282
- disabled : false
283
- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#time-equal
284
- - name : time-equal
285
- disabled : false
286
- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#var-naming
287
- - name : var-naming
288
- disabled : false
289
225
arguments :
290
- - ["ID"] # AllowList
291
- - ["Otel", "Aws", "Gcp"] # DenyList
292
- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#var-declaration
293
- - name : var-declaration
294
- disabled : false
295
- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unconditional-recursion
226
+ - " preserveScope"
227
+ - name : time-equal
296
228
- name : unconditional-recursion
297
- disabled : false
298
- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unexported-return
299
229
- name : unexported-return
300
- disabled : false
301
- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unhandled-error
302
230
- name : unhandled-error
303
- disabled : false
304
231
arguments :
305
232
- " fmt.Fprint"
306
233
- " fmt.Fprintf"
307
234
- " fmt.Fprintln"
308
235
- " fmt.Print"
309
236
- " fmt.Printf"
310
237
- " fmt.Println"
311
- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unnecessary-stmt
312
238
- name : unnecessary-stmt
313
- disabled : false
314
- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#useless-break
315
239
- name : useless-break
316
- disabled : false
317
- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#waitgroup-by-value
240
+ - name : var-declaration
241
+ - name : var-naming
242
+ arguments :
243
+ - ["ID"] # AllowList
244
+ - ["Otel", "Aws", "Gcp"] # DenyList
318
245
- name : waitgroup-by-value
319
- disabled : false
320
246
testifylint :
321
247
enable-all : true
322
248
disable :
0 commit comments