You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior
Linter doesn't suggest to use for i := range len(what) since what is modified inside and len(what) needs to be evaluated on each iteration (range expression doesn't do that per spec)`.
The text was updated successfully, but these errors were encountered:
Describe the bug
Linter incorrectly suggests to use range over int for string which is modified inside for loop.
To Reproduce
Run linter on this piece of code:
Expected behavior
Linter doesn't suggest to use
for i := range len(what)
sincewhat
is modified inside andlen(what)
needs to be evaluated on each iteration (range
expression doesn't do that per spec)`.The text was updated successfully, but these errors were encountered: