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
(The reasoning of person who introduced this is "not to mix assignments with new block starts").
Now, considering these two cases:
# 1foo=bar# 2foo.baz=bar
(1) is OK (4 spaces indentation). (2) is OK with this cop, but ...
C: [Correctable] Layout/FirstArgumentIndentation: Indent the first argument one step more than the start of the previous line.
bar
^^^
And if you try to auto-correct it...
rbcp.rb:10:3: C: [Corrected] Layout/AssignmentIndentation: Indent the first line of the right-hand-side of a multi-line assignment.
bar
^^^
rbcp.rb:10:5: C: [Corrected] Layout/FirstArgumentIndentation: Indent the first argument one step more than the start of the previous line.
bar
^^^
0 files inspected, 2 offenses detected, 2 offenses corrected
Infinite loop detected in /home/zverok/playground/ruby/rbcp.rb and caused by Layout/FirstArgumentIndentation -> Layout/AssignmentIndentation
I understand where it comes from (this statement is kinda both "assignment" and "method call"), but it seems to me that the "assignment" should take a priority here... And in any case, infinite loop seems the sub-optimal behavior :)
The text was updated successfully, but these errors were encountered:
We have (a bit unusual, I agree) this setting:
(The reasoning of person who introduced this is "not to mix assignments with new block starts").
Now, considering these two cases:
(1) is OK (4 spaces indentation). (2) is OK with this cop, but ...
And if you try to auto-correct it...
I understand where it comes from (this statement is kinda both "assignment" and "method call"), but it seems to me that the "assignment" should take a priority here... And in any case, infinite loop seems the sub-optimal behavior :)
The text was updated successfully, but these errors were encountered: