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/FirstArgumentIndentation is off-by-[1|2] when using splats with chained methods #9155
Labels
Comments
8 tasks
koic
added a commit
to koic/rubocop
that referenced
this issue
Dec 3, 2020
…llIndentation` Fixes rubocop#9155. This PR fixes a false positive for `Layout/MultilineMethodCallIndentation` when multiline method chain has expected indent width and the method is preceded by splat for `EnforcedStyle: indented_relative_to_receiver`
bbatsov
pushed a commit
that referenced
this issue
Dec 3, 2020
…tation` Fixes #9155. This PR fixes a false positive for `Layout/MultilineMethodCallIndentation` when multiline method chain has expected indent width and the method is preceded by splat for `EnforcedStyle: indented_relative_to_receiver`
koic
added a commit
to koic/rubocop
that referenced
this issue
Dec 3, 2020
Follow rubocop#9154, rubocop#9155, and rubocop#9102. This is a step towards the widespread use of regexp_parser 2.0. RuboCop core accepts regexp_parser 1.8, but several code is already incompatible with regexp_parser 1.8. It can cause issue because these combination of versions. Therefore, this PR ports code for regexp_parser 1.8 that will never be maintained from rubocop#9102. Implementation of this patch, code is intentionally duplicated because it is evaluated only when the class is defined. Also, since obsoleted code for regexp_parser 1.8 is assumed to never be maintained, the target to be removed is clear. To be honest, it's ugly as implementation, but I think it has the least impact for RuboCop 1.x series users.
bbatsov
pushed a commit
that referenced
this issue
Dec 3, 2020
Follow #9154, #9155, and #9102. This is a step towards the widespread use of regexp_parser 2.0. RuboCop core accepts regexp_parser 1.8, but several code is already incompatible with regexp_parser 1.8. It can cause issue because these combination of versions. Therefore, this PR ports code for regexp_parser 1.8 that will never be maintained from #9102. Implementation of this patch, code is intentionally duplicated because it is evaluated only when the class is defined. Also, since obsoleted code for regexp_parser 1.8 is assumed to never be maintained, the target to be removed is clear. To be honest, it's ugly as implementation, but I think it has the least impact for RuboCop 1.x series users.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a follow-up to #9115.
There is still/another issue in rubocop 1.5.1 with splatting and the Layout/MultilineMethodCallIndentation cop with
EnforcedStyle: consistent_relative_to_receiver
.Expected behavior
Both of these examples should be valid:
Actual behavior
Method chains appear to require an extra space to offset the splat operator.
Also:
Steps to reproduce the problem
Add to temp file and lint with
rubocop --only Layout/MultilineMethodCallIndentation temp.rb
Note, that my configuration is:
RuboCop version
The text was updated successfully, but these errors were encountered: