-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feat: add iotamixing linter #5966
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
base: main
Are you sure you want to change the base?
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
Linter
The Linter Tests Inside Golangci-lint
|
Please rebase your PR. We will not check the PR until the rebase. |
This PR is based on golangci-lint v1 (the branch The PR must target the branch |
Adding iotamixing linter.
This linter catches cases where consts contains iota but also consts with explicit r-vals, which will result in most-likely unintended shifting of the iota value.
Like in this example, where the top const shifts the value of the below "enum" const values being defined with iota, so
Unknown
has the value1
rather than0
.