class RuboCop::ConfigValidator

def alert_about_unrecognized_cops(invalid_cop_names)

def alert_about_unrecognized_cops(invalid_cop_names)
  unknown_cops = []
  invalid_cop_names.each do |name|
    # There could be a custom cop with this name. If so, don't warn
    next if Cop::Registry.global.contains_cop_matching?([name])
    # Special case for inherit_mode, which is a directive that we keep in
    # the configuration (even though it's not a cop), because it's easier
    # to do so than to pass the value around to various methods.
    next if name == 'inherit_mode'
    message = <<~MESSAGE.rstrip
      unrecognized cop or department #{name} found in #{smart_loaded_path}
      #{suggestion(name)}
    MESSAGE
    unknown_cops << message
  end
  raise ValidationError, unknown_cops.join("\n") if unknown_cops.any?
end