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 #9905] Fix single line concatenation false positive #9911

Merged

Commits on Jul 4, 2021

  1. [Fix rubocop#9905] Fix single line concatenation false positive

    By checking that the inspected node is multiline, we should
    get rid of this false positive. Happens for code like
    
    puts 'a'"#{b}"
    
    We're also checking that none of the children is multiline.
    This is done to skip weird corner cases that are
    impossible to have a consistent alignment rule for.
    
    It turns out that the new multiline checks make it
    possible to remove a couple of old conditions when checking
    if it's a concatenation with backslashes we're inspecting.
    It is perhaps possible to search for backslash and newline
    in the code, but I'd like to avoid that, because I'm
    afraid of other weird corner cases if we take the
    regexp search approach.
    jonas054 committed Jul 4, 2021
    Copy the full SHA
    98a5a12 View commit details
    Browse the repository at this point in the history