You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am experiencing an off-by-1 disagreement with the Layout/FirstArgumentIndentation cop (configured with EnforcedStyle: consistent_relative_to_receiver) when a leading * is involved. But preceding dots and &. behave fine.
# Valid[value1,my_object.my_method(arg1)# 2 spaces from start of `.my_method`]# Valid[value1,my_object
&.my_method(arg1)# 2 spaces from start of `&.my_method`]# Invalid :([value1,
*my_method(arg1)# 2 spaces from start of `*my_method`]
Expected behavior
Layout/FirstArgumentIndentation shouldn't auto-correct to and shouldn't require an extra space when an * precedes the method call.
Actual behavior
# This is considered invalid, when it shouldn't be[value1,
*my_method(arg1,# 2 spaces from start of `*my_method`arg2)]temp.rb:23:5: C: Layout/FirstArgumentIndentation: Indentthefirstargumentonestepmorethanmy_method(.arg1,
^^^^
# And will autocorrect to this, when it shouldn't (Note the extra / 3rd space before `arg1`[1,
*my_method(arg1,# 3 spaces from start of `*my_method`arg2)]
Steps to reproduce the problem
Just add this to a ruby file and run the Layout/FirstArgumentIndentation cop
…tation`
Fixesrubocop#9115.
This PR fixes a false positive for `Style/FirstArgumentIndentation` when
argument has expected indent width and the method is preceded by splat
for `EnforcedStyle: consistent_relative_to_receiver`.
Fixes#9115.
This PR fixes a false positive for `Style/FirstArgumentIndentation` when
argument has expected indent width and the method is preceded by splat
for `EnforcedStyle: consistent_relative_to_receiver`.
I am experiencing an off-by-1 disagreement with the Layout/FirstArgumentIndentation cop (configured with
EnforcedStyle: consistent_relative_to_receiver
) when a leading*
is involved. But preceding dots and&.
behave fine.Expected behavior
Layout/FirstArgumentIndentation shouldn't auto-correct to and shouldn't require an extra space when an
*
precedes the method call.Actual behavior
Steps to reproduce the problem
Just add this to a ruby file and run the Layout/FirstArgumentIndentation cop
Note, that my configuration is:
RuboCop version
Include the output of
rubocop -V
orbundle exec rubocop -V
if using Bundler. Here's an example:The text was updated successfully, but these errors were encountered: