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
Style/SymbolArray autocorrect breaks :[]
#7193
Comments
not entirely unsurprisingly |
I cannot reproduce by the default settings. Could you show a .rubocop.yml for this auto-correct? |
I'm using The contents of the .rubocop.yml though is:
|
I can reproduce it with a configuration of Style/PercentLiteralDelimiters cop. Style/PercentLiteralDelimiters:
PreferredDelimiters:
default: '{}' I guess you have the cop's setting in some .rubocop.yml. |
yeah, i just figured out the same thing. i don't quite understand how it was picking it up but:
|
Actually its possible I ran that in isolation with --only and then saw the |
This is actually a problem in I can reproduce the problem using the input %i[\[\] each each_index empty?] with this configuration: Style/PercentLiteralDelimiters:
Enabled: true
PreferredDelimiters:
'%i': '{}' I am going a add a PR for fixing this in a minute. |
This actually follows up on rubocop#5020
here's the diff resulting from the autocorrect:
and those expressions are not equivalent:
The text was updated successfully, but these errors were encountered: