Skip to content

Safe navigation operator ignored by Layout/MultilineMethodCallIndentation #5621

@deivid-rodriguez

Description

@deivid-rodriguez

Expected behavior

I would expected the safe navigation operator to be considered by Layout/MultilineMethodCallIndentation.

Actual behavior

The cop ignores method chaining when it uses .&.

Steps to reproduce the problem

test.rb

HakunaMatata.a
            .b
  &.c
  &.d

HakunaMatata.a
            .b
  .c
  .d
bundle exec rubocop --only Layout/MultilineMethodCallIndentation test.rb

only flags the second example.

RuboCop version

$ rubocop -V
0.52.1 (using Parser 2.5.0.2, running on ruby 2.5.0 x86_64-linux)

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requeststaleIssues that haven't been active in a while

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions