staticcheck linter does not exclude checks for Go versions greater than specified in go.mod file #4948
Open
6 of 7 tasks
Labels
bug
Something isn't working
Welcome
typecheck
section of the FAQ.Description of the problem
golangci-lint versions greater than v1.59.1 apply staticcheck lints for Go versions greater than that specified in the go.mod file. If I use staticcheck directly (recent versions up to and including v0.5.1), it honors the version of Go specified in the go.mod file.
NOTE:
Based on what I can tell, I have to check this box to proceed with GH issue submission, though that statement isn't accurate.
I did search issues (and PRs) in this project, and I did find similar issues, but they're marked as resolved:
SA3000: TestMain should call os.Exit
#4905That they're marked as resolved and do not link to a parent or follow-up GH issue suggests that the problem is believed to be fixed. Submitting this GH issue to provide detailed feedback showing that's unfortunately not the case.
Version of golangci-lint
Tested specifically with two versions.
This version works as expected:
This version does not:
Configuration
Go environment
Verbose output of running
A minimal reproducible example or link to a public repository
Steps taken to reproduce:
If I run staticcheck directly it honors the Go version specified the go.mod file, but not if I use that linter with golangci-lint versions after v1.59.1.
Detailed output below.
Validation
Supporter
The text was updated successfully, but these errors were encountered: