Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork1.5k
feat: add zero linter#3529
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Conversation
Implementsgolangci#3491.
ldez commentedFeb 1, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
In order for a pull request adding a linter to be reviewed, the linter and the PR must follow some requirements. Pull Request Description
Linter
The Linter Tests Inside Golangci-lint
|
| //golangcitest:args -Ezero | ||
| package testdata | ||
| var _ string = "" // want "shoud not assign zero value" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
please fix the typo inshould
|
This comment was marked as off-topic.
This comment was marked as off-topic.
CLAassistant commentedMay 20, 2025
|
Uh oh!
There was an error while loading.Please reload this page.
The
zerolinter finds unnecessary zero-value assignments when short-hand declaring & initializing a variable:https://github.com/gostaticanalysis/zero
Fixes#3491