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 assignment edge-cases in Layout/MultilineAssignmentLayout #7438

Merged

Commits on Oct 17, 2019

  1. Fix assignment edge-cases in Layout/MultilineAssignmentLayout

    Assignments from `:[]=` or setter methods (`foo.bar=(value)`) like the ones below did not produce cop reports and were not autocorrected. Now, they are!
    
    ```ruby
    hash[:foo] = if true
    ^^^^^^^^^^^^^^^^^^^^ Right hand side of multi-line assignment is on the same line as the assignment operator `=`.
    end
    ```
    
    ```ruby
    foo.bar = if true
    ^^^^^^^^^^^^^^^^^^^^ Right hand side of multi-line assignment is on the same line as the assignment operator `=`.
    end
    ```
    gsamokovarov committed Oct 17, 2019
    Copy the full SHA
    d80771d View commit details
    Browse the repository at this point in the history