class RuboCop::Cop::Lint::EndAlignment

def check_assignment(node, rhs)

def check_assignment(node, rhs)
  # If there are method calls chained to the right hand side of the
  # assignment, we let rhs be the receiver of those method calls before
  # we check if it's an if/unless/while/until.
  rhs = first_part_of_call_chain(rhs)
  return unless rhs
  return unless [:if, :while, :until].include?(rhs.type)
  return if ternary_op?(rhs)
  if style == :variable
    expr = node.loc.expression
    range = Parser::Source::Range.new(expr.source_buffer,
                                      expr.begin_pos,
                                      rhs.loc.keyword.end_pos)
    offset = rhs.loc.keyword.column - node.loc.expression.column
  else
    range = rhs.loc.keyword
    offset = 0
  end
  check_offset(rhs, range.source, offset)
  ignore_node(rhs) # Don't check again.
end