-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
"Use next to skip iteration" reporting wrong location. #2138
Comments
Any suggestions about the position of the offence and its message? |
I would expect the |
I agree with @zenspider on this one. The error should be pointing to the location of the offense ( Example def xxx
loop do
do_stuff
unless condition then
do_other_stuff1
do_other_stuff2
do_other_stuff3
end
unless condition2 then
do_other_stuff4
do_other_stuff5
do_other_stuff6
end
end
end reports
With the current implementation, this could lead to confusion for someone trying to fix what they think is only one issue, but in actuality is two issues. |
I just started working on this cop. I realized that the example that I wrote earlier only contains 1 offense, not 2 like I originally was thinking. I am still going to work on moving the highlight. |
Related to #1238:
reports:
But, the
loop
on line 2 column 3 is not the problem. The problem is in the contents of the loop, on line 5, column 4. This makes the report confusing and misleading.The text was updated successfully, but these errors were encountered: