-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feat: add gocheckerrbeforeuse linter #6070
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
Conversation
Hey, thank you for opening your first Pull Request ! |
In order for a pull request adding a linter to be reviewed, the linter and the PR must follow some requirements.
Pull Request Description
Base RequirementsThese requirements are not declarative; the team will verify them.
Linter
The Linter Tests Inside Golangci-lint
|
b62e05a
to
7c856d8
Compare
Signed-off-by: voloshina <[email protected]>
7c856d8
to
da2eea5
Compare
|
@ldez sorry for force push, i didnt expect you'd be so fast with review) Fixes:
|
My conclusion, even if I understand the need behind this linter, is not to accept this linter because the problems are related to the approach of the linter. I recommend creating a plugin: https://golangci-lint.run/plugins/module-plugins/ Thank you anyway for suggesting the addition of your linter. Some extra notes: The linter implementation is overusing inlined The licence file has been copied from another linter, and so the file is not right. The linter name is explicit, maybe too explicit: it's almost a complete sentence.
|
Adding gocheckerrbeforeuse linter.
The linter checks whether the error is handled before using the other returned values.
For example, the linter should catch the following situation, when
print
is called before err handling: