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
FirstMethodArgumentLineBreak plays poorly with arrays and hashes #6493
Comments
…ne single argument
…ne single argument
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! |
Additional example: sheet.add_row(k1:
v1) |
Dunno if this would be considered a separate issue but heredocs don't seem to be considered multiline either: foo(<<~EOF
here
EOF
) |
I was writing a feature request, but found this issue already filed. I agree with above. After adding
We end up with an autocorrection as follows.
After:
I would have liked to end up with
or
|
The cop might be somewhat broken, rubocop does not complain about:
I would expect it to return:
|
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! |
still there AFAIK |
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! |
This issues been automatically closed due to lack of activity. Feel free to re-open it if you ever come back to it. |
confirmed bug still exists in rubocop 1.2.0 |
Maybe this is intended behavior, but it seems that
Layout/FirstMethodArgumentLineBreak
does nothing if the first argument is a Hash or Array literal.Additionally, I'd like the closing parameter parenthesis to be aligned consistently, but
Layout/ClosingParenthesisIndentation
is no help in this (perhaps I need to use a different cop?).Expected behavior
Given rubocop config:
And offending (contrived) code:
I'd expect the autofixed code to be:
Actual behavior
RuboCop version
The text was updated successfully, but these errors were encountered: