Skip to content

Commit

Permalink
dev: remove unused function SetAnalyzerGoVersion (#5085)
Browse files Browse the repository at this point in the history
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
  • Loading branch information
alexandear and ldez authored Oct 25, 2024
1 parent 29c5529 commit 0ce421f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
11 changes: 0 additions & 11 deletions pkg/golinters/internal/staticcheck_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,8 @@ import (
scconfig "honnef.co/go/tools/config"

"github.com/golangci/golangci-lint/pkg/config"
"github.com/golangci/golangci-lint/pkg/logutils"
)

var debugf = logutils.Debug(logutils.DebugKeyMegacheck)

func SetupStaticCheckAnalyzers(src []*lint.Analyzer, checks []string) []*analysis.Analyzer {
var names []string
for _, a := range src {
Expand All @@ -32,14 +29,6 @@ func SetupStaticCheckAnalyzers(src []*lint.Analyzer, checks []string) []*analysi
return ret
}

func SetAnalyzerGoVersion(a *analysis.Analyzer, goVersion string) {
if v := a.Flags.Lookup("go"); v != nil {
if err := v.Value.Set(goVersion); err != nil {
debugf("Failed to set go version: %s", err)
}
}
}

func StaticCheckConfig(settings *config.StaticCheckSettings) *scconfig.Config {
var cfg *scconfig.Config

Expand Down
9 changes: 4 additions & 5 deletions pkg/logutils/logutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,10 @@ const (
)

const (
DebugKeyGoCritic = "gocritic" // Debugs `go-critic` linter.
DebugKeyGovet = "govet" // Debugs `govet` linter.
DebugKeyMegacheck = "megacheck" // Debugs `staticcheck` related linters.
DebugKeyNolint = "nolint" // Debugs a filter excluding issues by `//nolint` comments.
DebugKeyRevive = "revive" // Debugs `revive` linter.
DebugKeyGoCritic = "gocritic" // Debugs `go-critic` linter.
DebugKeyGovet = "govet" // Debugs `govet` linter.
DebugKeyNolint = "nolint" // Debugs a filter excluding issues by `//nolint` comments.
DebugKeyRevive = "revive" // Debugs `revive` linter.
)

func getEnabledDebugs() map[string]bool {
Expand Down

0 comments on commit 0ce421f

Please sign in to comment.