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'm not sure which autofixer did it, but here was my starting code:
[a, # a
b # b
]
And here are all the autofixers that ran:
$ rubocop -D -a a.rb
Inspecting 1 file
C
Offenses:
a.rb:1:1: C: [Corrected] Style/MultilineArrayBraceLayout: Closing array brace must be on the line after the last array element when opening brace is on a separate line from the first array element.
[
^
a.rb:1:1: C: [Corrected] Style/MultilineArrayBraceLayout: Closing array brace must be on the same line as the last array element when opening brace is on the same line as the first array element.
[a, # a
^^^^^^^
a.rb:1:2: C: [Corrected] Style/FirstArrayElementLineBreak: Add a line break before the first element of a multi-line array.
[a, # a
^
a.rb:2:1: C: [Corrected] Style/IndentArray: Use 2 spaces for indentation in an array, relative to the start of the line where the left square bracket is.
a, # a
^
a.rb:3:1: C: [Corrected] Style/AlignArray: Align the elements of an array literal if they span more than one line.
b
^
a.rb:3:1: C: [Corrected] Style/TrailingCommaInLiteral: Put a comma after the last item of a multiline array.
b
^
a.rb:3:2: C: [Corrected] Style/AlignArray: Align the elements of an array literal if they span more than one line.
b]
^
1 file inspected, 7 offenses detected, 7 offenses corrected
And it ended up with
[
a, # a
b,
]
The text was updated successfully, but these errors were encountered:
…o-correct
Instead of removing the range preceding the ), which can contain
a heredoc, remove the ) and insert another one in the correct place.
Also fixesrubocop#2848 where it's comments instead of heredocs and ]
instead of ) but the principle is the same.
I'm not sure which autofixer did it, but here was my starting code:
And here are all the autofixers that ran:
And it ended up with
The text was updated successfully, but these errors were encountered: