forked from rubocop/rubocop
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix rubocop#7063] Fix unsafe autocorrect for 'Style/TernaryParentheses'
This takes the precedence of operators used into account when deciding to autocorrect. The issue is that if an operator of precedence below that of the ternary operator (e.g. "or") is used, then the existing autocorrect can change the semantics by removing parentheses. With this change, the autocorrect will no longer attempt to make this correction.
- Loading branch information
1 parent
64f6ca7
commit 4d01b52
Showing
3 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters