-
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 UselessAssignment when in a slim capture block #68
Labels
Comments
up |
I believe this happens with any method that takes a block, not just |
Any idea on how to fix this. Happy to open a PR with some guidance. |
The code above gives warning on line 1: RuboCop: Lint/UselessAssignment: Useless assignment to variable -
Workaround is to disable RuboCop: Lint/UselessAssignment in .slim-lint.yml:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a simple recreation of the issue I bumped into with a
form_for
helper in rails. I'm using capture so that it's distilled down to the essence of the issue:Running slim-lint on this gives me:
test.html.slim:2 [W] RuboCop: Useless assignment to variable - `url`.
The text was updated successfully, but these errors were encountered: