-
Notifications
You must be signed in to change notification settings - Fork 60
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
False-positive UnusedArgument warning #61
Comments
Have also faced a warning with: - if a.size == 2
.first= a.first
.last= a.last
- else
= a.last
/ test.slim:3 [W] RuboCop: Move `a.last` out of the conditional.
/ test.slim:5 [W] RuboCop: Move `a.last` out of the conditional. |
One more similar to first one: = capture
- style = :test
div class=style
- capture
- other_style = :test
div class=other_style
/ gives warning only for the first part:
/ test.slim:2 [W] RuboCop: Useless assignment to variable - `style`. |
Thanks for the reports, @printercu. I can't reproduce the issue for the first example you give: - 2.times do |x|
div attr=x This doesn't output a warning for me. I can reproduce the issue for your other examples, however. Can I get you to confirm that you see an issue for this first case? If so, can you include the output of |
I can't reproduce exactly the same case too :) I don't remember, maybe I've checked this only within template and it was wrapped into other block. So it's close to 3d case, but maybe slightly different: = capture
- 2.times do |x|
div attr=x |
Hi!
I've found that block argument which is used as attribute value generates warning, like this:
Can this be fixed?
The text was updated successfully, but these errors were encountered: