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
False positive for MultilineOperationIndentation #7094
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! |
As far as I read the test code, this is the expected behavior common to both shared_examples 'common' do
(snip)
it 'registers an offense for no indentation of second line' do
expect_offense(<<~RUBY)
a +
b
^ Use 2 (not 0) spaces for indenting an expression spanning multiple lines.
RUBY
end I think example code and/or documentation should be added if the test code is correct. |
Hi @koic , |
Update the cop documentation to make it more clear which operands should be aligned, and which should always be indented.
Expected behavior
When enforce style of
Layout/MultilineOperationIndentation
cop isaligned
Rubocop should report no offences for multi-line operation without assignment like below.Actual behavior
Rubocop reports
MultilineOperationIndentation
offence with following message:Steps to reproduce the problem
Unzip attached zip file and run command below.
sample.zip
Then you can reproduce this issue.
RuboCop version
The text was updated successfully, but these errors were encountered: