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

Add new Style/MultilineInPatternThen cop #9834

Merged

Commits on May 28, 2021

  1. Add new Style/MultilineInPatternThen cop

    Follow rubocop/ruby-style-guide#873.
    
    This PR adds new `Style/MultilineInPatternThen` cop.
    It checks uses of the `then` keyword in multi-line `in` statement.
    
    ```ruby
    # bad
    case expression
    in pattern then
    end
    
    # good
    case expression
    in pattern
    end
    ```
    
    This cop is similar to `Style/MultilineWhenThen` (and `Style/MultilineIfThen`)
    but with different supported syntax and Ruby version (requires 2.7 or higher).
    koic committed May 28, 2021
    Copy the full SHA
    3bd037c View commit details
    Browse the repository at this point in the history