-
-
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
Confusing staticcheck rule activation #1649
Comments
Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors. |
$ golangci-lint run
cmd/foo.go:7:2: `age` is unused (structcheck)
age int
^
cmd/foo.go:18:9: S1039: unnecessary use of fmt.Sprintf (gosimple)
return fmt.Sprintf("Hallo")
^ staticcheck is in fact split into different parts: |
Should it be removed from the list of linters then, or replaced by an error / warning telling the user exactly which linters it was split up into? Running |
More explanation about staticcheck configuration in: #1989 (comment) Closed in favor of #357 |
Version of golangci-lint
Config file
Go environment
Consider the following minimal example:
Running
staticcheck .
finds the following problems:Running
golangci-lint run --disable-all --enable staticcheck -v.
doesn't output any issues:It exits with status code 0, i.e. it doesn't find any issues with the code.
The text was updated successfully, but these errors were encountered: