build(deps): bump honnef.co/go/tools from v0.1.4 to v0.2.0 (#2019)

This commit is contained in:
Mitsuo Heijo 2021-05-30 03:44:40 +09:00 committed by GitHub
parent 2dcc761d21
commit a68a88ee02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 13 deletions

2
go.mod
View File

@ -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

4
go.sum generated
View File

@ -1051,8 +1051,8 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
honnef.co/go/tools v0.1.4 h1:SadWOkti5uVN1FAMgxn165+Mw00fuQKyk4Gyn/inxNQ=
honnef.co/go/tools v0.1.4/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las=
honnef.co/go/tools v0.2.0 h1:ws8AfbgTX3oIczLPNPCu5166oBg9ST2vNs0rcht+mDE=
honnef.co/go/tools v0.2.0/go.mod h1:lPVVZ2BS5TfnjLyizF7o7hv7j9/L+8cZY2hLyjP9cGY=
mvdan.cc/gofumpt v0.1.1 h1:bi/1aS/5W00E2ny5q65w9SnKpWEF/UIOqDYBILpo9rA=
mvdan.cc/gofumpt v0.1.1/go.mod h1:yXG1r1WqZVKWbVRtBWKWX9+CxGYfA51nSomhM0woR48=
mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed h1:WX1yoOaKQfddO/mLzdV4wptyWgoH/6hwLs7QHTixo0I=

View File

@ -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"
@ -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)
}
}

View File

@ -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
}