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
No offense with Lint/ShadowingOuterLocalVariable cop
Lint/ShadowingOuterLocalVariable
W: Lint/ShadowingOuterLocalVariable: Shadowing outer local variable - item. array.each do |item| ^^^^
def test(array) case array.length when 1 item = array.first p item else array.each do |item| p item end end end
1.27.0 (using Parser 3.1.1.0, rubocop-ast 1.16.0, running on ruby 2.7.5 x86_64-linux) - rubocop-performance 1.13.3 - rubocop-rake 0.6.0 - rubocop-rspec 2.9.0
I thought #10479 would fix this one, but it didn't.
The text was updated successfully, but these errors were encountered:
I've confirmed that it does reproduce. Sorry. I'll attempt to fix it.
Sorry, something went wrong.
[Fix rubocop#10512] Fix a false positive for `Lint/ShadowingOuterLoca…
1965935
…lVariable` conditional statement and block variable
[Fix #10512] Fix a false positive for `Lint/ShadowingOuterLocalVariab…
0984886
…le` conditional statement and block variable
915961b
Successfully merging a pull request may close this issue.
Expected behavior
No offense with
Lint/ShadowingOuterLocalVariable
copActual behavior
Steps to reproduce the problem
RuboCop version
I thought #10479 would fix this one, but it didn't.
The text was updated successfully, but these errors were encountered: