@@ -158,6 +158,8 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
158
158
159
159
const megacheckName = "megacheck"
160
160
161
+ // The linters are in the alphabetical order (case-insensitive).
162
+ // When a new linter is added the version in `WithSince(...)` must be the next version of golangci-lint.
161
163
lcs := []* linter.Config {
162
164
linter .NewConfig (golinters .NewAsciicheck ()).
163
165
WithSince ("v1.26.0" ).
@@ -233,6 +235,12 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
233
235
WithLoadForGoAnalysis ().
234
236
WithURL ("https://github.com/Antonboom/errname" ),
235
237
238
+ linter .NewConfig (golinters .NewErrorLint (errorlintCfg )).
239
+ WithSince ("v1.32.0" ).
240
+ WithPresets (linter .PresetBugs , linter .PresetError ).
241
+ WithLoadForGoAnalysis ().
242
+ WithURL ("https://github.com/polyfloyd/go-errorlint" ),
243
+
236
244
linter .NewConfig (golinters .NewExhaustive (exhaustiveCfg )).
237
245
WithSince (" v1.28.0" ).
238
246
WithPresets (linter .PresetBugs ).
@@ -272,39 +280,6 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
272
280
WithAutoFix ().
273
281
WithURL ("https://github.com/daixiang0/gci" ),
274
282
275
- linter .NewConfig (golinters .NewGocritic ()).
276
- WithSince ("v1.12.0" ).
277
- WithPresets (linter .PresetStyle , linter .PresetMetaLinter ).
278
- WithLoadForGoAnalysis ().
279
- WithURL ("https://github.com/go-critic/go-critic" ),
280
-
281
- linter .NewConfig (golinters .NewGoerr113 ()).
282
- WithSince ("v1.26.0" ).
283
- WithPresets (linter .PresetStyle , linter .PresetError ).
284
- WithLoadForGoAnalysis ().
285
- WithURL ("https://github.com/Djarvur/go-err113" ),
286
-
287
- linter .NewConfig (golinters .NewErrorLint (errorlintCfg )).
288
- WithSince ("v1.32.0" ).
289
- WithPresets (linter .PresetBugs , linter .PresetError ).
290
- WithLoadForGoAnalysis ().
291
- WithURL ("https://github.com/polyfloyd/go-errorlint" ),
292
-
293
- linter .NewConfig (golinters .NewGoHeader ()).
294
- WithSince ("v1.28.0" ).
295
- WithPresets (linter .PresetStyle ).
296
- WithURL ("https://github.com/denis-tingajkin/go-header" ),
297
-
298
- linter .NewConfig (golinters .NewGoMND (m .cfg )).
299
- WithSince ("v1.22.0" ).
300
- WithPresets (linter .PresetStyle ).
301
- WithURL ("https://github.com/tommy-muehle/go-mnd" ),
302
-
303
- linter .NewConfig (golinters .NewGoPrintfFuncName ()).
304
- WithSince ("v1.23.0" ).
305
- WithPresets (linter .PresetStyle ).
306
- WithURL ("https://github.com/jirfag/go-printf-func-name" ),
307
-
308
283
linter .NewConfig (golinters .NewGochecknoglobals ()).
309
284
WithSince ("v1.12.0" ).
310
285
WithPresets (linter .PresetStyle ).
@@ -325,6 +300,12 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
325
300
WithPresets (linter .PresetStyle ).
326
301
WithURL ("https://github.com/jgautheron/goconst" ),
327
302
303
+ linter .NewConfig (golinters .NewGocritic ()).
304
+ WithSince ("v1.12.0" ).
305
+ WithPresets (linter .PresetStyle , linter .PresetMetaLinter ).
306
+ WithLoadForGoAnalysis ().
307
+ WithURL ("https://github.com/go-critic/go-critic" ),
308
+
328
309
linter .NewConfig (golinters .NewGocyclo ()).
329
310
WithSince ("v1.0.0" ).
330
311
WithPresets (linter .PresetComplexity ).
@@ -341,6 +322,12 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
341
322
WithPresets (linter .PresetStyle , linter .PresetComment ).
342
323
WithURL ("https://github.com/matoous/godox" ),
343
324
325
+ linter .NewConfig (golinters .NewGoerr113 ()).
326
+ WithSince ("v1.26.0" ).
327
+ WithPresets (linter .PresetStyle , linter .PresetError ).
328
+ WithLoadForGoAnalysis ().
329
+ WithURL ("https://github.com/Djarvur/go-err113" ),
330
+
344
331
linter .NewConfig (golinters .NewGofmt ()).
345
332
WithSince ("v1.0.0" ).
346
333
WithPresets (linter .PresetFormatting ).
@@ -353,12 +340,29 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
353
340
WithAutoFix ().
354
341
WithURL ("https://github.com/mvdan/gofumpt" ),
355
342
343
+ linter .NewConfig (golinters .NewGoHeader ()).
344
+ WithSince ("v1.28.0" ).
345
+ WithPresets (linter .PresetStyle ).
346
+ WithURL ("https://github.com/denis-tingajkin/go-header" ),
347
+
356
348
linter .NewConfig (golinters .NewGoimports ()).
357
349
WithSince ("v1.20.0" ).
358
350
WithPresets (linter .PresetFormatting , linter .PresetImport ).
359
351
WithAutoFix ().
360
352
WithURL ("https://godoc.org/golang.org/x/tools/cmd/goimports" ),
361
353
354
+ linter .NewConfig (golinters .NewGolint ()).
355
+ WithSince ("v1.0.0" ).
356
+ WithLoadForGoAnalysis ().
357
+ WithPresets (linter .PresetStyle ).
358
+ WithURL ("https://github.com/golang/lint" ).
359
+ Deprecated ("The repository of the linter has been archived by the owner." , "v1.41.0" , "revive" ),
360
+
361
+ linter .NewConfig (golinters .NewGoMND (m .cfg )).
362
+ WithSince ("v1.22.0" ).
363
+ WithPresets (linter .PresetStyle ).
364
+ WithURL ("https://github.com/tommy-muehle/go-mnd" ),
365
+
362
366
linter .NewConfig (golinters .NewGoModDirectives (goModDirectivesCfg )).
363
367
WithSince ("v1.39.0" ).
364
368
WithPresets (linter .PresetStyle , linter .PresetModule ).
@@ -369,6 +373,11 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
369
373
WithPresets (linter .PresetStyle , linter .PresetImport , linter .PresetModule ).
370
374
WithURL ("https://github.com/ryancurrah/gomodguard" ),
371
375
376
+ linter .NewConfig (golinters .NewGoPrintfFuncName ()).
377
+ WithSince ("v1.23.0" ).
378
+ WithPresets (linter .PresetStyle ).
379
+ WithURL ("https://github.com/jirfag/go-printf-func-name" ),
380
+
372
381
linter .NewConfig (golinters .NewGosec (gosecCfg )).
373
382
WithSince ("v1.0.0" ).
374
383
WithLoadForGoAnalysis ().
@@ -419,13 +428,6 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
419
428
WithLoadForGoAnalysis ().
420
429
WithURL ("https://github.com/butuzov/ireturn" ),
421
430
422
- linter .NewConfig (golinters .NewGolint ()).
423
- WithSince ("v1.0.0" ).
424
- WithLoadForGoAnalysis ().
425
- WithPresets (linter .PresetStyle ).
426
- WithURL ("https://github.com/golang/lint" ).
427
- Deprecated ("The repository of the linter has been archived by the owner." , "v1.41.0" , "revive" ),
428
-
429
431
linter .NewConfig (golinters .NewLLL ()).
430
432
WithSince ("v1.8.0" ).
431
433
WithPresets (linter .PresetStyle ),
@@ -624,17 +626,17 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
624
626
WithAutoFix ().
625
627
WithURL ("https://github.com/ultraware/whitespace" ),
626
628
627
- linter .NewConfig (golinters .NewWSL ()).
628
- WithSince ("v1.20.0" ).
629
- WithPresets (linter .PresetStyle ).
630
- WithURL ("https://github.com/bombsimon/wsl" ),
631
-
632
629
linter .NewConfig (golinters .NewWrapcheck (wrapcheckCfg )).
633
630
WithSince ("v1.32.0" ).
634
631
WithPresets (linter .PresetStyle , linter .PresetError ).
635
632
WithLoadForGoAnalysis ().
636
633
WithURL ("https://github.com/tomarrell/wrapcheck" ),
637
634
635
+ linter .NewConfig (golinters .NewWSL ()).
636
+ WithSince ("v1.20.0" ).
637
+ WithPresets (linter .PresetStyle ).
638
+ WithURL ("https://github.com/bombsimon/wsl" ),
639
+
638
640
// nolintlint must be last because it looks at the results of all the previous linters for unused nolint directives
639
641
linter .NewConfig (golinters .NewNoLintLint ()).
640
642
WithSince ("v1.26.0" ).
0 commit comments