class RuboCop::Cop::InternalAffairs::OnSendWithoutOnCSend

Checks for cops that define ‘on_send` without define `on_csend`.

Although in some cases it can be predetermined that safe navigation will never be used with the code checked by a specific cop, in general it is good practice to handle safe navigation methods if handling any ‘send` node.

NOTE: It is expected to disable this cop for cops that check for method calls on receivers that cannot be nil (‘self`, a literal, a constant), and method calls that will never have a receiver (ruby keywords like `raise`, macros like `attr_reader`, DSL methods, etc.), and other checks that wouldn’t make sense to support safe navigation.

@example

# bad
class MyCop < RuboCop::Cop:Base
  def on_send(node)
    # ...
  end
end

# good - explicit method definition
class MyCop < RuboCop::Cop:Base
  def on_send(node)
    # ...
  end

  def on_csend(node)
    # ...
  end
end

# good - alias
class MyCop < RuboCop::Cop:Base
  def on_send(node)
    # ...
  end
  alias on_csend on_send
end

# good - alias_method
class MyCop < RuboCop::Cop:Base
  def on_send(node)
    # ...
  end
  alias_method :on_csend, :on_send
end