-
-
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
feat: add intrange linter #4378
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
|
FYI 0.0.x are not semver complaint because a bug fix cannot happen before a minor release or an impossible initial version v0.0.0.
https://semver.org/#how-should-i-deal-with-revisions-in-the-0yz-initial-development-phase The version in |
Thanks for taking a first pass @ldez! I believe both of your comments have been addressed. |
Co-authored-by: Ludovic Fernandez <ldez@users.noreply.github.com>
Co-authored-by: Ludovic Fernandez <ldez@users.noreply.github.com>
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.
LGTM
Hi,
I'd like to add a new linter: intrange
It looks for loops which iterate over integers and suggests that the new go1.22 support for ranging over integers can be used. See: https://go.dev/ref/spec#Go_1.22
It does not suggest updating loops which:
It works for integer literals, const/vars, and expressions that evaluate to an integer