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 a false positive for Layout/SpaceAroundOperators #8906

Merged

Commits on Oct 20, 2020

  1. Fix a false positive for Layout/SpaceAroundOperators

    This PR fixes a false positive for `Layout/SpaceAroundOperators`
    when upward alignment. Two false positive examples are shown.
    
    1. `output` and `logger` assignments are aligned with the same margin
    
    ```ruby
    integer_message = 12345
    output  = StringIO.new
    logger  = Logger.new(output)
    ```
    
    2. `expected` and `tagging` assignments are aligned with a blank line in between
    
    ```ruby
    expected = posts(:welcome)
    
    tagging  = Tagging.all.merge!(includes: :taggable).find(taggings(:welcome_general).id)
    assert_no_queries { assert_equal expected, tagging.taggable }
    ```
    
    cf: rails/rails#36943
    koic committed Oct 20, 2020
    Copy the full SHA
    9b00c9a View commit details
    Browse the repository at this point in the history