Skip to content

Commit 0ce421f

Browse files
alexandearldez
andauthored
dev: remove unused function SetAnalyzerGoVersion (golangci#5085)
Co-authored-by: Fernandez Ludovic <[email protected]>
1 parent 29c5529 commit 0ce421f

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

pkg/golinters/internal/staticcheck_common.go

-11
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,8 @@ import (
99
scconfig "honnef.co/go/tools/config"
1010

1111
"github.com/golangci/golangci-lint/pkg/config"
12-
"github.com/golangci/golangci-lint/pkg/logutils"
1312
)
1413

15-
var debugf = logutils.Debug(logutils.DebugKeyMegacheck)
16-
1714
func SetupStaticCheckAnalyzers(src []*lint.Analyzer, checks []string) []*analysis.Analyzer {
1815
var names []string
1916
for _, a := range src {
@@ -32,14 +29,6 @@ func SetupStaticCheckAnalyzers(src []*lint.Analyzer, checks []string) []*analysi
3229
return ret
3330
}
3431

35-
func SetAnalyzerGoVersion(a *analysis.Analyzer, goVersion string) {
36-
if v := a.Flags.Lookup("go"); v != nil {
37-
if err := v.Value.Set(goVersion); err != nil {
38-
debugf("Failed to set go version: %s", err)
39-
}
40-
}
41-
}
42-
4332
func StaticCheckConfig(settings *config.StaticCheckSettings) *scconfig.Config {
4433
var cfg *scconfig.Config
4534

pkg/logutils/logutils.go

+4-5
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,10 @@ const (
6060
)
6161

6262
const (
63-
DebugKeyGoCritic = "gocritic" // Debugs `go-critic` linter.
64-
DebugKeyGovet = "govet" // Debugs `govet` linter.
65-
DebugKeyMegacheck = "megacheck" // Debugs `staticcheck` related linters.
66-
DebugKeyNolint = "nolint" // Debugs a filter excluding issues by `//nolint` comments.
67-
DebugKeyRevive = "revive" // Debugs `revive` linter.
63+
DebugKeyGoCritic = "gocritic" // Debugs `go-critic` linter.
64+
DebugKeyGovet = "govet" // Debugs `govet` linter.
65+
DebugKeyNolint = "nolint" // Debugs a filter excluding issues by `//nolint` comments.
66+
DebugKeyRevive = "revive" // Debugs `revive` linter.
6867
)
6968

7069
func getEnabledDebugs() map[string]bool {

0 commit comments

Comments
 (0)