-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
staticcheck linter does not exclude checks for Go versions greater than specified in go.mod file #4948
Comments
EDIT: Does not appear related after all. |
It is expected: currently the version doesn't depend on This is explained here: #4907 (comment) |
Hi @ldez, I reviewed your notes from that PR, but it wasn't apparent to me that the behavior is as you noted here. Thank you for clarifying. I'll continue to ignore the reported issues for affected projects until the root issue is resolved. Thanks for taking the time to respond and provide the additional details! |
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: