Skip to content

Commit 77d41a1

Browse files
committed
staticcheck: re-enable for Go 1.18
As of honnef.co/go/[email protected], `staticcheck` supports Go 1.18 and generics. The dependency was bumped here by dependabot in golangci#2738, but the no-op fallback configs needed to be removed. See also golangci#2649 for overall Go 1.18/generics support progress.
1 parent 7d24a49 commit 77d41a1

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

pkg/lint/lintersdb/manager.go

+8-10
Original file line numberDiff line numberDiff line change
@@ -419,8 +419,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
419419
WithLoadForGoAnalysis().
420420
WithPresets(linter.PresetStyle).
421421
WithAlternativeNames(megacheckName).
422-
WithURL("https://github.com/dominikh/go-tools/tree/master/simple").
423-
WithNoopFallback(m.cfg),
422+
WithURL("https://github.com/dominikh/go-tools/tree/master/simple"),
424423

425424
linter.NewConfig(golinters.NewGovet(govetCfg)).
426425
WithSince("v1.0.0").
@@ -484,7 +483,8 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
484483
WithLoadForGoAnalysis().
485484
WithPresets(linter.PresetPerformance).
486485
WithURL("https://github.com/mdempsky/maligned").
487-
Deprecated("The repository of the linter has been archived by the owner.", "v1.38.0", "govet 'fieldalignment'"),
486+
Deprecated("The repository of the linter has been archived by the owner.", "v1.38.0",
487+
"govet 'fieldalignment'"),
488488

489489
linter.NewConfig(golinters.NewMisspell()).
490490
WithSince("v1.8.0").
@@ -578,8 +578,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
578578
WithLoadForGoAnalysis().
579579
WithPresets(linter.PresetBugs, linter.PresetMetaLinter).
580580
WithAlternativeNames(megacheckName).
581-
WithURL("https://staticcheck.io/").
582-
WithNoopFallback(m.cfg),
581+
WithURL("https://staticcheck.io/"),
583582

584583
linter.NewConfig(golinters.NewStructcheck()).
585584
WithSince("v1.0.0").
@@ -592,8 +591,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
592591
WithSince("v1.20.0").
593592
WithLoadForGoAnalysis().
594593
WithPresets(linter.PresetStyle).
595-
WithURL("https://github.com/dominikh/go-tools/tree/master/stylecheck").
596-
WithNoopFallback(m.cfg),
594+
WithURL("https://github.com/dominikh/go-tools/tree/master/stylecheck"),
597595

598596
linter.NewConfig(golinters.NewTagliatelle(tagliatelleCfg)).
599597
WithSince("v1.40.0").
@@ -650,8 +648,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
650648
WithAlternativeNames(megacheckName).
651649
ConsiderSlow().
652650
WithChangeTypes().
653-
WithURL("https://github.com/dominikh/go-tools/tree/master/unused").
654-
WithNoopFallback(m.cfg),
651+
WithURL("https://github.com/dominikh/go-tools/tree/master/unused"),
655652

656653
linter.NewConfig(golinters.NewVarcheck()).
657654
WithSince("v1.0.0").
@@ -783,7 +780,8 @@ func (m Manager) getAnalyzerPlugin(path string) (AnalyzerPlugin, error) {
783780
configFilePath := viper.ConfigFileUsed()
784781
absConfigFilePath, err := filepath.Abs(configFilePath)
785782
if err != nil {
786-
return nil, fmt.Errorf("could not get absolute representation of config file path %q: %v", configFilePath, err)
783+
return nil, fmt.Errorf("could not get absolute representation of config file path %q: %v", configFilePath,
784+
err)
787785
}
788786
path = filepath.Join(filepath.Dir(absConfigFilePath), path)
789787
}

0 commit comments

Comments
 (0)