@@ -59,8 +59,19 @@ func (m *Manager) WithCustomLinters() *Manager {
59
59
60
60
func (Manager ) AllPresets () []string {
61
61
return []string {
62
- linter .PresetBugs , linter .PresetComplexity , linter .PresetFormatting ,
63
- linter .PresetPerformance , linter .PresetStyle , linter .PresetUnused ,
62
+ linter .PresetBugs ,
63
+ linter .PresetComment ,
64
+ linter .PresetComplexity ,
65
+ linter .PresetError ,
66
+ linter .PresetFormatting ,
67
+ linter .PresetImport ,
68
+ linter .PresetMetaLinter ,
69
+ linter .PresetModule ,
70
+ linter .PresetPerformance ,
71
+ linter .PresetSQL ,
72
+ linter .PresetStyle ,
73
+ linter .PresetTest ,
74
+ linter .PresetUnused ,
64
75
}
65
76
}
66
77
@@ -119,7 +130,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
119
130
lcs := []* linter.Config {
120
131
linter .NewConfig (golinters .NewGovet (govetCfg )).
121
132
WithLoadForGoAnalysis ().
122
- WithPresets (linter .PresetBugs ).
133
+ WithPresets (linter .PresetBugs , linter . PresetMetaLinter ).
123
134
WithAlternativeNames ("vet" , "vetshadow" ).
124
135
WithURL ("https://golang.org/cmd/vet/" ),
125
136
linter .NewConfig (golinters .NewBodyclose ()).
@@ -132,20 +143,20 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
132
143
WithURL ("https://github.com/sonatard/noctx" ),
133
144
linter .NewConfig (golinters .NewErrcheck ()).
134
145
WithLoadForGoAnalysis ().
135
- WithPresets (linter .PresetBugs ).
146
+ WithPresets (linter .PresetBugs , linter . PresetError ).
136
147
WithURL ("https://github.com/kisielk/errcheck" ),
137
148
linter .NewConfig (golinters .NewGolint ()).
138
149
WithLoadForGoAnalysis ().
139
150
WithPresets (linter .PresetStyle ).
140
151
WithURL ("https://github.com/golang/lint" ),
141
152
linter .NewConfig (golinters .NewRowsErrCheck ()).
142
153
WithLoadForGoAnalysis ().
143
- WithPresets (linter .PresetPerformance , linter .PresetBugs ).
154
+ WithPresets (linter .PresetBugs , linter .PresetSQL ).
144
155
WithURL ("https://github.com/jingyugao/rowserrcheck" ),
145
156
146
157
linter .NewConfig (golinters .NewStaticcheck ()).
147
158
WithLoadForGoAnalysis ().
148
- WithPresets (linter .PresetBugs ).
159
+ WithPresets (linter .PresetBugs , linter . PresetMetaLinter ).
149
160
WithAlternativeNames (megacheckName ).
150
161
WithURL ("https://staticcheck.io/" ),
151
162
linter .NewConfig (golinters .NewUnused ()).
@@ -229,15 +240,15 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
229
240
WithAutoFix ().
230
241
WithURL ("https://github.com/mvdan/gofumpt" ),
231
242
linter .NewConfig (golinters .NewGoimports ()).
232
- WithPresets (linter .PresetFormatting ).
243
+ WithPresets (linter .PresetFormatting , linter . PresetImport ).
233
244
WithAutoFix ().
234
245
WithURL ("https://godoc.org/golang.org/x/tools/cmd/goimports" ),
235
246
linter .NewConfig (golinters .NewGoHeader ()).
236
247
WithPresets (linter .PresetStyle ).
237
248
WithLoadForGoAnalysis ().
238
249
WithURL ("https://github.com/denis-tingajkin/go-header" ),
239
250
linter .NewConfig (golinters .NewGci ()).
240
- WithPresets (linter .PresetFormatting ).
251
+ WithPresets (linter .PresetFormatting , linter . PresetImport ).
241
252
WithLoadForGoAnalysis ().
242
253
WithAutoFix ().
243
254
WithURL ("https://github.com/daixiang0/gci" ),
@@ -248,10 +259,10 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
248
259
Deprecated ("The repository of the linter has been archived by the owner. Use govet 'fieldalignment' instead." ),
249
260
linter .NewConfig (golinters .NewDepguard ()).
250
261
WithLoadForGoAnalysis ().
251
- WithPresets (linter .PresetStyle ).
262
+ WithPresets (linter .PresetStyle , linter . PresetImport , linter . PresetModule ).
252
263
WithURL ("https://github.com/OpenPeeDeeP/depguard" ),
253
264
linter .NewConfig (golinters .NewMisspell ()).
254
- WithPresets (linter .PresetStyle ).
265
+ WithPresets (linter .PresetStyle , linter . PresetComment ).
255
266
WithAutoFix ().
256
267
WithURL ("https://github.com/client9/misspell" ),
257
268
linter .NewConfig (golinters .NewLLL ()).
@@ -264,7 +275,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
264
275
WithPresets (linter .PresetStyle ).
265
276
WithURL ("https://github.com/alexkohler/dogsled" ),
266
277
linter .NewConfig (golinters .NewNakedret ()).
267
- WithPresets (linter .PresetComplexity ).
278
+ WithPresets (linter .PresetStyle ).
268
279
WithURL ("https://github.com/alexkohler/nakedret" ),
269
280
linter .NewConfig (golinters .NewPrealloc ()).
270
281
WithPresets (linter .PresetPerformance ).
@@ -274,7 +285,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
274
285
WithURL ("https://github.com/kyoh86/scopelint" ).
275
286
Deprecated ("The repository of the linter has been deprecated by the owner. Use 'exportloopref' instead." ),
276
287
linter .NewConfig (golinters .NewGocritic ()).
277
- WithPresets (linter .PresetStyle ).
288
+ WithPresets (linter .PresetStyle , linter . PresetMetaLinter ).
278
289
WithLoadForGoAnalysis ().
279
290
WithURL ("https://github.com/go-critic/go-critic" ),
280
291
linter .NewConfig (golinters .NewGochecknoinits ()).
@@ -284,10 +295,10 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
284
295
WithPresets (linter .PresetStyle ).
285
296
WithURL ("https://github.com/leighmcculloch/gochecknoglobals" ),
286
297
linter .NewConfig (golinters .NewGodox ()).
287
- WithPresets (linter .PresetStyle ).
298
+ WithPresets (linter .PresetStyle , linter . PresetComment ).
288
299
WithURL ("https://github.com/matoous/godox" ),
289
300
linter .NewConfig (golinters .NewFunlen ()).
290
- WithPresets (linter .PresetStyle ).
301
+ WithPresets (linter .PresetComplexity ).
291
302
WithURL ("https://github.com/ultraware/funlen" ),
292
303
linter .NewConfig (golinters .NewWhitespace ()).
293
304
WithPresets (linter .PresetStyle ).
@@ -303,19 +314,19 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
303
314
WithPresets (linter .PresetStyle ).
304
315
WithURL ("https://github.com/tommy-muehle/go-mnd" ),
305
316
linter .NewConfig (golinters .NewGoerr113 ()).
306
- WithPresets (linter .PresetStyle ).
317
+ WithPresets (linter .PresetStyle , linter . PresetError ).
307
318
WithLoadForGoAnalysis ().
308
319
WithURL ("https://github.com/Djarvur/go-err113" ),
309
320
linter .NewConfig (golinters .NewGomodguard ()).
310
- WithPresets (linter .PresetStyle ).
321
+ WithPresets (linter .PresetStyle , linter . PresetImport , linter . PresetModule ).
311
322
WithLoadForGoAnalysis ().
312
323
WithURL ("https://github.com/ryancurrah/gomodguard" ),
313
324
linter .NewConfig (golinters .NewGodot ()).
314
- WithPresets (linter .PresetStyle ).
325
+ WithPresets (linter .PresetStyle , linter . PresetComment ).
315
326
WithAutoFix ().
316
327
WithURL ("https://github.com/tetafro/godot" ),
317
328
linter .NewConfig (golinters .NewTestpackage (testpackageCfg )).
318
- WithPresets (linter .PresetStyle ).
329
+ WithPresets (linter .PresetStyle , linter . PresetTest ).
319
330
WithLoadForGoAnalysis ().
320
331
WithURL ("https://github.com/maratori/testpackage" ),
321
332
linter .NewConfig (golinters .NewNestif ()).
@@ -330,35 +341,35 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
330
341
WithLoadForGoAnalysis ().
331
342
WithURL ("https://github.com/nishanths/exhaustive" ),
332
343
linter .NewConfig (golinters .NewSQLCloseCheck ()).
333
- WithPresets (linter .PresetBugs ).
344
+ WithPresets (linter .PresetBugs , linter . PresetSQL ).
334
345
WithLoadForGoAnalysis ().
335
346
WithURL ("https://github.com/ryanrolds/sqlclosecheck" ),
336
347
linter .NewConfig (golinters .NewNLReturn ()).
337
348
WithPresets (linter .PresetStyle ).
338
349
WithLoadForGoAnalysis ().
339
350
WithURL ("https://github.com/ssgreg/nlreturn" ),
340
351
linter .NewConfig (golinters .NewWrapcheck ()).
341
- WithPresets (linter .PresetStyle ).
352
+ WithPresets (linter .PresetStyle , linter . PresetError ).
342
353
WithLoadForGoAnalysis ().
343
354
WithURL ("https://github.com/tomarrell/wrapcheck" ),
344
355
linter .NewConfig (golinters .NewThelper (thelperCfg )).
345
356
WithPresets (linter .PresetStyle ).
346
357
WithLoadForGoAnalysis ().
347
358
WithURL ("https://github.com/kulti/thelper" ),
348
359
linter .NewConfig (golinters .NewTparallel ()).
349
- WithPresets (linter .PresetStyle ).
360
+ WithPresets (linter .PresetStyle , linter . PresetTest ).
350
361
WithLoadForGoAnalysis ().
351
362
WithURL ("https://github.com/moricho/tparallel" ),
352
363
linter .NewConfig (golinters .NewExhaustiveStruct (exhaustiveStructCfg )).
353
- WithPresets (linter .PresetStyle ).
364
+ WithPresets (linter .PresetStyle , linter . PresetTest ).
354
365
WithLoadForGoAnalysis ().
355
366
WithURL ("https://github.com/mbilski/exhaustivestruct" ),
356
367
linter .NewConfig (golinters .NewErrorLint (errorlintCfg )).
357
- WithPresets (linter .PresetBugs ).
368
+ WithPresets (linter .PresetBugs , linter . PresetError ).
358
369
WithLoadForGoAnalysis ().
359
370
WithURL ("https://github.com/polyfloyd/go-errorlint" ),
360
371
linter .NewConfig (golinters .NewParallelTest ()).
361
- WithPresets (linter .PresetStyle ).
372
+ WithPresets (linter .PresetStyle , linter . PresetTest ).
362
373
WithLoadForGoAnalysis ().
363
374
WithURL ("https://github.com/kunwardeep/paralleltest" ),
364
375
linter .NewConfig (golinters .NewMakezero ()).
@@ -375,7 +386,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
375
386
WithPresets (linter .PresetStyle ).
376
387
WithURL ("https://github.com/nishanths/predeclared" ),
377
388
linter .NewConfig (golinters .NewRevive (reviveCfg )).
378
- WithPresets (linter .PresetStyle ).
389
+ WithPresets (linter .PresetStyle , linter . PresetMetaLinter ).
379
390
ConsiderSlow ().
380
391
WithURL ("https://github.com/mgechev/revive" ),
381
392
linter .NewConfig (golinters .NewDurationCheck ()).
@@ -399,7 +410,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
399
410
WithLoadForGoAnalysis ().
400
411
WithURL ("https://github.com/gostaticanalysis/forcetypeassert" ),
401
412
linter .NewConfig (golinters .NewGoModDirectives (goModDirectivesCfg )).
402
- WithPresets (linter .PresetStyle ).
413
+ WithPresets (linter .PresetStyle , linter . PresetModule ).
403
414
WithLoadForGoAnalysis ().
404
415
WithURL ("https://github.com/ldez/gomoddirectives" ),
405
416
0 commit comments