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
HashSyntax plus HashAlignment breaks the page #8347
Labels
Comments
So it looks like the problem is that both cops do inserts - An easy fix would be to reorder the cops so |
koic
added a commit
to koic/rubocop
that referenced
this issue
Jul 16, 2020
Fixes rubocop#8347. This PR fixes an incorrect auto-correct for `EnforcedStyle: hash_rockets` of `Style/HashSyntax` with `Layout/HashAlignment`.
8 tasks
dorner
pushed a commit
to wishabi/rubocop
that referenced
this issue
Jul 16, 2020
Combining an autocorrect with HashAlignment with one turning hashes into `hash_rocket` syntax would leave the code in a syntax error.
dorner
pushed a commit
to wishabi/rubocop
that referenced
this issue
Jul 16, 2020
bbatsov
pushed a commit
that referenced
this issue
Jul 18, 2020
Fixes #8347. This PR fixes an incorrect auto-correct for `EnforcedStyle: hash_rockets` of `Style/HashSyntax` with `Layout/HashAlignment`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When mixing
Style/HashSyntax
with a setting ofhash_rockets
and the defaultLayout/HashAlignment
cop, auto-correction can break the page and render a syntax error.Expected behavior
Original code:
Expected output:
Actual behavior
Actual output:
Steps to reproduce the problem
Running
rubocop -a
on the above code will replicate the problem.RuboCop version
The text was updated successfully, but these errors were encountered: