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
With a method like:
def foo yield ({ a: 6, b: 7, }) end
Running rubocop -a autocorrects this to:
rubocop -a
def foo yield { a: 6, b: 7, } end
And gives this output:
app/test.rb:4:9: E: Lint/Syntax: unexpected token tLCURLY (Using Ruby 2.5 parser; configure using TargetRubyVersion parameter, under AllCops) yield { ^ app/test.rb:4:9: C: [Corrected] Style/RedundantParentheses: Don't use parentheses around a literal. yield ({ ... ^^
When running this auto-corrected file, I get a syntax error:
app/test.rb:4: syntax error, unexpected '{' yield { ^
I believe the Style/RedundantParentheses cop should not consider parentheses in this situation to be redundant
Style/RedundantParentheses
$ rubocop -V 0.86.0 (using Parser 2.7.1.4, rubocop-ast 0.0.3, running on ruby 2.5.1 x86_64-darwin18)
The text was updated successfully, but these errors were encountered:
I will look into a fix for this
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
With a method like:
Running
rubocop -a
autocorrects this to:And gives this output:
When running this auto-corrected file, I get a syntax error:
I believe the
Style/RedundantParentheses
cop should not consider parentheses in this situation to be redundantThe text was updated successfully, but these errors were encountered: