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 #10648] Allow Style/TernaryParentheses to take priority over Style/RedundantParentheses for requiring parentheses #10874

Merged
merged 1 commit into from Aug 6, 2022

Commits on Aug 5, 2022

  1. [Fix rubocop#10648] Allow Style/TernaryParentheses to take priority…

    … over `Style/RedundantParentheses`.
    
    `Style/TernaryParentheses` allows RuboCop to require ternary conditions are wrapped in parentheses, but this behaviour doesn't take effect when `Style/RedundantParentheses` is also enabled, in order to prevent an infinite loop.
    
    However, it makes more sense for `TernaryParentheses` to take priority here and have `RedudantParentheses` allow the parentheses instead of creating an infinite autocorrection loop.
    
    This change moves the infinite loop protection into `RedundantParentheses` instead.
    dvandersluis committed Aug 5, 2022
    Configuration menu
    Copy the full SHA
    d267934 View commit details
    Browse the repository at this point in the history