-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
Description
Rubocop is reporting an error with previously passing code.
Steps to reproduce the problem
rows.each_with_index.with_object([]) do |(row, row_index), galaxies|
(0...row.length).select { row[it] == "#" }
.each { galaxies << [row_index, it] }
end
Expected behavior
No offenses to be raised.
Actual behavior
test.rb:43:29: C: [Correctable] Layout/MultilineMethodCallIndentation: Use 2 (not 16) spaces for indenting an expression spanning multiple lines.
.each { galaxies << [row_index, it] }
^^^^^
RuboCop version
Include the output of rubocop -V or bundle exec rubocop -V if using Bundler.
If you see extension cop versions (e.g. rubocop-performance, rubocop-rspec, and others)
output by rubocop -V, include them as well. Here's an example:
1.84.1 (using Parser 3.3.10.1, Prism 1.9.0, rubocop-ast 1.49.0, analyzing as Ruby 4.0, running on ruby 4.0.0) +server [x86_64-linux]
- rubocop-performance 1.26.1
- rubocop-rake 0.7.1
- rubocop-rspec 3.9.0
Reactions are currently unavailable