KEMBAR78
False `Layout/MultilineOperationIndentation` negatives when access modifiers are used · Issue #14522 · rubocop/rubocop · GitHub
Skip to content

False Layout/MultilineOperationIndentation negatives when access modifiers are used #14522

@vlad-pisanov

Description

@vlad-pisanov

Consider:

def foo
  a &&
  b
end

# ✔️ Use 2 (not 0) spaces for indenting an expression spanning multiple lines

private def foo
  a &&
  b
end

# ❌ No offense detected

The same applies to private_class_method (and any inline modifier)

1.80.1 (using Parser 3.3.9.0, Prism 1.4.0, rubocop-ast 1.46.0, analyzing as Ruby 3.3, running on ruby 3.3.2) [x86_64-darwin24]
  - rubocop-minitest 0.38.1
  - rubocop-performance 1.25.0
  - rubocop-rails 2.33.3
  - rubocop-factory_bot 2.27.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