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

Support auto-correction for Style/IfUnlessModifierOfIfUnless #8223

Commits on Jun 28, 2020

  1. Support auto-correction for Style/IfUnlessModifierOfIfUnless

    This PR supports auto-correction for `Style/IfUnlessModifierOfIfUnless`.
    
    From:
    
    ```ruby
    condition ? then_part : else_part unless external_condition
    ```
    
    To:
    
    ```ruby
    unless external_condition
    condition ? then_part : else_part
    end
    ```
    
    Branch indentation is left to `Layout/IndentationWidth` cop to keep the code simple.
    koic committed Jun 28, 2020
    Copy the full SHA
    bf8aaba View commit details
    Browse the repository at this point in the history