class RuboCop::CLI

def apply_default_formatter

def apply_default_formatter
  # This must be done after the options have already been processed,
  # because they can affect how ConfigStore behaves
  @options[:formatters] ||= begin
    if @options[:auto_gen_config]
      formatter = 'autogenconf'
    else
      cfg = @config_store.for(Dir.pwd).for_all_cops
      formatter = cfg['DefaultFormatter'] || 'progress'
    end
    [[formatter, @options[:output_path]]]
  end
  return unless @options[:auto_gen_config]
  @options[:formatters] << [Formatter::DisabledConfigFormatter,
                            ConfigLoader::AUTO_GENERATED_FILE]
end