We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug Benchmark loop using the old syntax for i := 0; i < b.N; i++ should be detected.
for i := 0; i < b.N; i++
To Reproduce Write a benchmark loop with for i := 0; i < b.N; i++ .
Expected behavior The linter should suggest to rewrite to for range b.N
for range b.N
Additional context Related to #13
The text was updated successfully, but these errors were encountered:
#13 (comment)
I think the proper solution here is to expose a setting to exclude patterns.
What kind of pattern do you have in mind ? Do you want to match b.N or the entire line ?
b.N
Sorry, something went wrong.
I was thinking the whole for statement (sans body) but I'm really not settled one way or another, do you have opinions?
I was thinking the whole for statement (sans body)
looks good 👍
Successfully merging a pull request may close this issue.
Describe the bug
Benchmark loop using the old syntax
for i := 0; i < b.N; i++
should be detected.To Reproduce
Write a benchmark loop with
for i := 0; i < b.N; i++
.Expected behavior
The linter should suggest to rewrite to
for range b.N
Additional context
Related to #13
The text was updated successfully, but these errors were encountered: