Skip to content

Commit

Permalink
build(deps): bump honnef.co/go/tools from v0.1.4 to v0.2.0 (golangci#…
Browse files Browse the repository at this point in the history
  • Loading branch information
johejo authored and SeigeC committed Apr 4, 2023
1 parent 100eb85 commit 7fffd9b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ require (
github.com/yeya24/promlinter v0.1.0
golang.org/x/tools v0.1.2-0.20210512205948-8287d5da45e4
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
honnef.co/go/tools v0.1.4
honnef.co/go/tools v0.2.0
mvdan.cc/gofumpt v0.1.1
mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed
mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions pkg/golinters/staticcheck_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"unicode"

"golang.org/x/tools/go/analysis"
"honnef.co/go/tools/analysis/lint"
scconfig "honnef.co/go/tools/config"

"github.com/golangci/golangci-lint/pkg/config"
Expand All @@ -27,19 +28,19 @@ func getGoVersion(settings *config.StaticCheckSettings) string {
return "1.13"
}

func setupStaticCheckAnalyzers(src map[string]*analysis.Analyzer, goVersion string, checks []string) []*analysis.Analyzer {
func setupStaticCheckAnalyzers(src []*lint.Analyzer, goVersion string, checks []string) []*analysis.Analyzer {
var names []string
for name := range src {
names = append(names, name)
for _, a := range src {
names = append(names, a.Analyzer.Name)
}

filter := filterAnalyzerNames(names, checks)

var ret []*analysis.Analyzer
for name, a := range src {
if filter[name] {
setAnalyzerGoVersion(a, goVersion)
ret = append(ret, a)
for _, a := range src {
if filter[a.Analyzer.Name] {
setAnalyzerGoVersion(a.Analyzer, goVersion)
ret = append(ret, a.Analyzer)
}
}

Expand Down
6 changes: 3 additions & 3 deletions pkg/golinters/unused.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ func NewUnused(settings *config.StaticCheckSettings) *goanalysis.Linter {

analyzer := &analysis.Analyzer{
Name: name,
Doc: unused.Analyzer.Doc,
Requires: unused.Analyzer.Requires,
Doc: unused.Analyzer.Analyzer.Doc,
Requires: unused.Analyzer.Analyzer.Requires,
Run: func(pass *analysis.Pass) (interface{}, error) {
res, err := unused.Analyzer.Run(pass)
res, err := unused.Analyzer.Analyzer.Run(pass)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 7fffd9b

Please sign in to comment.