class RuboCop::Formatter::DisabledConfigFormatter

def set_max(cfg, cop_name)

def set_max(cfg, cop_name)
  return unless cfg[:exclude_limit]
  # In case auto_gen_only_exclude is set, only modify the maximum if the
  # files are not excluded one by one.
  if !@options[:auto_gen_only_exclude] ||
     @files_with_offenses[cop_name].size > @exclude_limit
    cfg.merge!(cfg[:exclude_limit])
  end
  # Remove already used exclude_limit.
  cfg.reject! { |key| key == :exclude_limit }
end