Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading