Closed
Description
- Yes, I'm using a binary release within 2 latest major releases. Only such installations are supported.
- Yes, I've searched similar issues on GitHub and didn't find any.
- Yes, I've included all information below (version, config, etc).
- Yes, I've tried with the standalone linter if available. (https://golangci-lint.run/usage/linters/)
Description of the problem
golangci-lint started to "indirectly" depend on a Go standard library https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/buildtag package which is available only starting from Go 1.16
Example failure on Go 1.14:
github.com/golangci/golangci-lint/cmd/golangci-lint imports
github.com/golangci/golangci-lint/pkg/commands imports
github.com/golangci/golangci-lint/pkg/lint/lintersdb imports
github.com/golangci/golangci-lint/pkg/golinters imports
golang.org/x/tools/go/analysis/passes/buildtag imports
go/build/constraint: package go/build/constraint is not in GOROOT (/opt/hostedtoolcache/go/1.14.15/x64/src/go/build/constraint)
Moreover, the information here is no longer true: https://golangci-lint.run/usage/install/#install-from-source
This is especially not good for repositories using the https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module approach for installing additional Go-based tooling.
I think it would be good to support the 3 latest minor versions of Go. Or at least please fix the docs.
Version of golangci-lint
v1.40.0
Go environment
Any Go < 1.16