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?
to your account
Following is a sample:
return failed msg: 'Added', contact: contact if contact.present?
When run rubocop -a . for above file, it will be changed to:
rubocop -a .
return failed msg: 'Added', contact: if contact.present?
Which is a syntax error.
rubocop 1.26.1, ruby 3.1.0, with following settings:
The text was updated successfully, but these errors were encountered:
[Fix rubocop#10494] Fix a false positive for Style/HashSyntax
This PR fixes a false positive for `Style/HashSyntax` when `return`
with one line `if` condition follows (without parentheses).
Merge pull request #10497 from koic/fix_a_false_positive_for_style_ha…
[Fix #10494] Fix a false positive for `Style/HashSyntax`
Successfully merging a pull request may close this issue.