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
Layout/MultilineOperationIndentation is missing some cases #7592
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding! |
Is this really a bug though?
|
It might not be its business to take care of To be honest, I agree with you that class A
def m
puts "a" \
"b"
end
end from my point of view should raise at least some offence. I might be just me, but aestetically this code is broken. |
Oh, I agree it's not a great alignment. I just meant to ask: is it this cop's responsibility? I'm still pretty ignorant of all the different cops we have 😀 |
Got it. Still, I think it's a very minor issue, I've only seen this problem once in the wild, fixed it by hand, and no cop complained about the correct indentation. No objections if this is closed. It's just my OCD that pushed me to file this ticket. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding! |
The cop Layout/MultilineOperationIndentation doesn't view the backslash as an operator, which is correct. Therefore, a new cop is needed to inspect character literals broken up into multiple lines with backslashes at the ends of the lines. The new cop deals exclusively with string literals, not any other constructs where backslashes might be used to "glue" lines together.
Layout/MultilineOperationIndentation is missing cases when
\
is used as string concatenation.Expected behavior
All the offences are detected.
Actual behavior
Only the first statement is detected as offensive.
Steps to reproduce the problem
RuboCop version
The text was updated successfully, but these errors were encountered: