tomcz/openldap_exporter

make fails as staticcheck@latest (2023.1) doesn't work with go 1.18

vladimir9876 opened this issue · 1 comments

go install honnef.co/go/tools/cmd/staticcheck@latest
# honnef.co/go/tools/unused
/go/pkg/mod/honnef.co/go/tools@v0.4.2/unused/unused.go:419:14: obj.Origin undefined (type *types.Var has no field or method Origin)
/go/pkg/mod/honnef.co/go/tools@v0.4.2/unused/unused.go:421:14: obj.Origin undefined (type *types.Func has no field or method Origin)
note: module requires Go 1.19
# honnef.co/go/tools/staticcheck
/go/pkg/mod/honnef.co/go/tools@v0.4.2/staticcheck/lint.go:4025:29: righti.Method(i).Origin undefined (type *types.Func has no field or method Origin)
/go/pkg/mod/honnef.co/go/tools@v0.4.2/staticcheck/lint.go:4030:36: sel.Obj().(*types.Func).Origin undefined (type *types.Func has no field or method Origin)
note: module requires Go 1.19
make: *** [Makefile:33: lint] Error 2

go install honnef.co/go/tools/cmd/staticcheck@v0.3.3
works

tomcz commented

Latest master branch now requires go 1.20.x and uses golangci-lint instead of just using staticcheck by itself. This error should not occur there.