Skip to content

Infinite loop with Layout/EndAlignment #697

@Cerber-Ursi

Description

@Cerber-Ursi

I've tried the following code:

class Test
  def test
    42 + (if @x == 0
            1
          else
            2
    end)
  end
end

Rubocop 1.73 on this code reports a couple of errors, but finishes successfully. StandardRB, however, fails with the infinite loop from Layout/EndAlignment rule. Looks like this is something that was fixed in newer Rubocop version?

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