Skip to content
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

[Fix #1281] Fix WhereRange autocorrect for complex expressions #1292

Merged
merged 1 commit into from
Jun 8, 2024

Conversation

fatkodima
Copy link
Contributor

Fixes #1281.

We can't for sure tell when we not need parentheses (without reimplementing Style/RedundantParentheses cop), so I excluded the most popular and obvious variants.

@koic
Copy link
Member

koic commented Jun 7, 2024

Can you add [Fix #1281] to the beginning of the commit message title?

@fatkodima fatkodima force-pushed the fix-where-range-complex-expressions branch from 9259302 to 6bb23b4 Compare June 7, 2024 08:31
@fatkodima fatkodima changed the title Fix WhereRange autocorrect for complex expressions [Fix #1281] Fix WhereRange autocorrect for complex expressions Jun 7, 2024
@fatkodima
Copy link
Contributor Author

Added.

@koic koic merged commit eb89bdd into rubocop:master Jun 8, 2024
14 checks passed
@fatkodima fatkodima deleted the fix-where-range-complex-expressions branch June 8, 2024 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rails/WhereRange output the error if using ternary operator.
2 participants