Skip to content

rcop 1.84.0 introduces indentation regressions in block arguments #14805

@Magikdidi24

Description

@Magikdidi24

The new rcop release 1.84.0 changes indentation inside block arguments (closures passed to methods), reducing indentation by 2 spaces. This appears to be a regression from fixes that were applied in 1.82.1.


Steps to reproduce the problem

update your rubocop to 1.84.0

Expected behavior

Block body should be indented 2 spaces relative to the method call, not aligned with the opening brace.

   .indent {
-    out
-      .break
-      .sep_with_breaks(inner) { |v|
-        simplified_process(v)
-    }
+  out
+    .break
+    .sep_with_breaks(inner) { |v|
+    simplified_process(v)
+  }
  }

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:

$ [bundle exec] rubocop -V
1.84.0 (using Parser 3.3.10.1, Prism 1.8.0, rubocop-ast 1.49.0, analyzing as Ruby 3.4, running on ruby 3.4.1) [x86_64-linux]
  - rubocop-minitest 0.38.2
  - rubocop-performance 1.26.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions