@@ -59,8 +59,19 @@ func (m *Manager) WithCustomLinters() *Manager {
5959
6060func (Manager ) AllPresets () []string {
6161 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 ,
6475 }
6576}
6677
@@ -119,7 +130,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
119130 lcs := []* linter.Config {
120131 linter .NewConfig (golinters .NewGovet (govetCfg )).
121132 WithLoadForGoAnalysis ().
122- WithPresets (linter .PresetBugs ).
133+ WithPresets (linter .PresetBugs , linter . PresetMetaLinter ).
123134 WithAlternativeNames ("vet" , "vetshadow" ).
124135 WithURL ("https://golang.org/cmd/vet/" ),
125136 linter .NewConfig (golinters .NewBodyclose ()).
@@ -132,20 +143,20 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
132143 WithURL ("https://github.com/sonatard/noctx" ),
133144 linter .NewConfig (golinters .NewErrcheck ()).
134145 WithLoadForGoAnalysis ().
135- WithPresets (linter .PresetBugs ).
146+ WithPresets (linter .PresetBugs , linter . PresetError ).
136147 WithURL ("https://github.com/kisielk/errcheck" ),
137148 linter .NewConfig (golinters .NewGolint ()).
138149 WithLoadForGoAnalysis ().
139150 WithPresets (linter .PresetStyle ).
140151 WithURL ("https://github.com/golang/lint" ),
141152 linter .NewConfig (golinters .NewRowsErrCheck ()).
142153 WithLoadForGoAnalysis ().
143- WithPresets (linter .PresetPerformance , linter .PresetBugs ).
154+ WithPresets (linter .PresetBugs , linter .PresetSQL ).
144155 WithURL ("https://github.com/jingyugao/rowserrcheck" ),
145156
146157 linter .NewConfig (golinters .NewStaticcheck ()).
147158 WithLoadForGoAnalysis ().
148- WithPresets (linter .PresetBugs ).
159+ WithPresets (linter .PresetBugs , linter . PresetMetaLinter ).
149160 WithAlternativeNames (megacheckName ).
150161 WithURL ("https://staticcheck.io/" ),
151162 linter .NewConfig (golinters .NewUnused ()).
@@ -229,15 +240,15 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
229240 WithAutoFix ().
230241 WithURL ("https://github.com/mvdan/gofumpt" ),
231242 linter .NewConfig (golinters .NewGoimports ()).
232- WithPresets (linter .PresetFormatting ).
243+ WithPresets (linter .PresetFormatting , linter . PresetImport ).
233244 WithAutoFix ().
234245 WithURL ("https://godoc.org/golang.org/x/tools/cmd/goimports" ),
235246 linter .NewConfig (golinters .NewGoHeader ()).
236247 WithPresets (linter .PresetStyle ).
237248 WithLoadForGoAnalysis ().
238249 WithURL ("https://github.com/denis-tingajkin/go-header" ),
239250 linter .NewConfig (golinters .NewGci ()).
240- WithPresets (linter .PresetFormatting ).
251+ WithPresets (linter .PresetFormatting , linter . PresetImport ).
241252 WithLoadForGoAnalysis ().
242253 WithAutoFix ().
243254 WithURL ("https://github.com/daixiang0/gci" ),
@@ -248,10 +259,10 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
248259 Deprecated ("The repository of the linter has been archived by the owner. Use govet 'fieldalignment' instead." ),
249260 linter .NewConfig (golinters .NewDepguard ()).
250261 WithLoadForGoAnalysis ().
251- WithPresets (linter .PresetStyle ).
262+ WithPresets (linter .PresetStyle , linter . PresetImport , linter . PresetModule ).
252263 WithURL ("https://github.com/OpenPeeDeeP/depguard" ),
253264 linter .NewConfig (golinters .NewMisspell ()).
254- WithPresets (linter .PresetStyle ).
265+ WithPresets (linter .PresetStyle , linter . PresetComment ).
255266 WithAutoFix ().
256267 WithURL ("https://github.com/client9/misspell" ),
257268 linter .NewConfig (golinters .NewLLL ()).
@@ -264,7 +275,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
264275 WithPresets (linter .PresetStyle ).
265276 WithURL ("https://github.com/alexkohler/dogsled" ),
266277 linter .NewConfig (golinters .NewNakedret ()).
267- WithPresets (linter .PresetComplexity ).
278+ WithPresets (linter .PresetStyle ).
268279 WithURL ("https://github.com/alexkohler/nakedret" ),
269280 linter .NewConfig (golinters .NewPrealloc ()).
270281 WithPresets (linter .PresetPerformance ).
@@ -274,7 +285,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
274285 WithURL ("https://github.com/kyoh86/scopelint" ).
275286 Deprecated ("The repository of the linter has been deprecated by the owner. Use 'exportloopref' instead." ),
276287 linter .NewConfig (golinters .NewGocritic ()).
277- WithPresets (linter .PresetStyle ).
288+ WithPresets (linter .PresetStyle , linter . PresetMetaLinter ).
278289 WithLoadForGoAnalysis ().
279290 WithURL ("https://github.com/go-critic/go-critic" ),
280291 linter .NewConfig (golinters .NewGochecknoinits ()).
@@ -284,10 +295,10 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
284295 WithPresets (linter .PresetStyle ).
285296 WithURL ("https://github.com/leighmcculloch/gochecknoglobals" ),
286297 linter .NewConfig (golinters .NewGodox ()).
287- WithPresets (linter .PresetStyle ).
298+ WithPresets (linter .PresetStyle , linter . PresetComment ).
288299 WithURL ("https://github.com/matoous/godox" ),
289300 linter .NewConfig (golinters .NewFunlen ()).
290- WithPresets (linter .PresetStyle ).
301+ WithPresets (linter .PresetComplexity ).
291302 WithURL ("https://github.com/ultraware/funlen" ),
292303 linter .NewConfig (golinters .NewWhitespace ()).
293304 WithPresets (linter .PresetStyle ).
@@ -303,19 +314,19 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
303314 WithPresets (linter .PresetStyle ).
304315 WithURL ("https://github.com/tommy-muehle/go-mnd" ),
305316 linter .NewConfig (golinters .NewGoerr113 ()).
306- WithPresets (linter .PresetStyle ).
317+ WithPresets (linter .PresetStyle , linter . PresetError ).
307318 WithLoadForGoAnalysis ().
308319 WithURL ("https://github.com/Djarvur/go-err113" ),
309320 linter .NewConfig (golinters .NewGomodguard ()).
310- WithPresets (linter .PresetStyle ).
321+ WithPresets (linter .PresetStyle , linter . PresetImport , linter . PresetModule ).
311322 WithLoadForGoAnalysis ().
312323 WithURL ("https://github.com/ryancurrah/gomodguard" ),
313324 linter .NewConfig (golinters .NewGodot ()).
314- WithPresets (linter .PresetStyle ).
325+ WithPresets (linter .PresetStyle , linter . PresetComment ).
315326 WithAutoFix ().
316327 WithURL ("https://github.com/tetafro/godot" ),
317328 linter .NewConfig (golinters .NewTestpackage (testpackageCfg )).
318- WithPresets (linter .PresetStyle ).
329+ WithPresets (linter .PresetStyle , linter . PresetTest ).
319330 WithLoadForGoAnalysis ().
320331 WithURL ("https://github.com/maratori/testpackage" ),
321332 linter .NewConfig (golinters .NewNestif ()).
@@ -330,35 +341,35 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
330341 WithLoadForGoAnalysis ().
331342 WithURL ("https://github.com/nishanths/exhaustive" ),
332343 linter .NewConfig (golinters .NewSQLCloseCheck ()).
333- WithPresets (linter .PresetBugs ).
344+ WithPresets (linter .PresetBugs , linter . PresetSQL ).
334345 WithLoadForGoAnalysis ().
335346 WithURL ("https://github.com/ryanrolds/sqlclosecheck" ),
336347 linter .NewConfig (golinters .NewNLReturn ()).
337348 WithPresets (linter .PresetStyle ).
338349 WithLoadForGoAnalysis ().
339350 WithURL ("https://github.com/ssgreg/nlreturn" ),
340351 linter .NewConfig (golinters .NewWrapcheck ()).
341- WithPresets (linter .PresetStyle ).
352+ WithPresets (linter .PresetStyle , linter . PresetError ).
342353 WithLoadForGoAnalysis ().
343354 WithURL ("https://github.com/tomarrell/wrapcheck" ),
344355 linter .NewConfig (golinters .NewThelper (thelperCfg )).
345356 WithPresets (linter .PresetStyle ).
346357 WithLoadForGoAnalysis ().
347358 WithURL ("https://github.com/kulti/thelper" ),
348359 linter .NewConfig (golinters .NewTparallel ()).
349- WithPresets (linter .PresetStyle ).
360+ WithPresets (linter .PresetStyle , linter . PresetTest ).
350361 WithLoadForGoAnalysis ().
351362 WithURL ("https://github.com/moricho/tparallel" ),
352363 linter .NewConfig (golinters .NewExhaustiveStruct (exhaustiveStructCfg )).
353- WithPresets (linter .PresetStyle ).
364+ WithPresets (linter .PresetStyle , linter . PresetTest ).
354365 WithLoadForGoAnalysis ().
355366 WithURL ("https://github.com/mbilski/exhaustivestruct" ),
356367 linter .NewConfig (golinters .NewErrorLint (errorlintCfg )).
357- WithPresets (linter .PresetBugs ).
368+ WithPresets (linter .PresetBugs , linter . PresetError ).
358369 WithLoadForGoAnalysis ().
359370 WithURL ("https://github.com/polyfloyd/go-errorlint" ),
360371 linter .NewConfig (golinters .NewParallelTest ()).
361- WithPresets (linter .PresetStyle ).
372+ WithPresets (linter .PresetStyle , linter . PresetTest ).
362373 WithLoadForGoAnalysis ().
363374 WithURL ("https://github.com/kunwardeep/paralleltest" ),
364375 linter .NewConfig (golinters .NewMakezero ()).
@@ -375,7 +386,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
375386 WithPresets (linter .PresetStyle ).
376387 WithURL ("https://github.com/nishanths/predeclared" ),
377388 linter .NewConfig (golinters .NewRevive (reviveCfg )).
378- WithPresets (linter .PresetStyle ).
389+ WithPresets (linter .PresetStyle , linter . PresetMetaLinter ).
379390 ConsiderSlow ().
380391 WithURL ("https://github.com/mgechev/revive" ),
381392 linter .NewConfig (golinters .NewDurationCheck ()).
@@ -399,7 +410,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
399410 WithLoadForGoAnalysis ().
400411 WithURL ("https://github.com/gostaticanalysis/forcetypeassert" ),
401412 linter .NewConfig (golinters .NewGoModDirectives (goModDirectivesCfg )).
402- WithPresets (linter .PresetStyle ).
413+ WithPresets (linter .PresetStyle , linter . PresetModule ).
403414 WithLoadForGoAnalysis ().
404415 WithURL ("https://github.com/ldez/gomoddirectives" ),
405416
0 commit comments