Module: RuboCop::OptionsHelp Private

Defined in:
lib/rubocop/options.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

This module contains help texts for command line options.

Constant Summary collapse

MAX_EXCL =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

RuboCop::Options::DEFAULT_MAXIMUM_EXCLUSION_ITEMS.to_s
FORMATTER_OPTION_LIST =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

RuboCop::Formatter::FormatterSet::BUILTIN_FORMATTERS_FOR_KEYS.keys
TEXT =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

{
  only:                             'Run only the given cop(s).',
  only_guide_cops:                  ['Run only cops for rules that link to a',
                                     'style guide.'],
  except:                           'Disable the given cop(s).',
  require:                          'Require Ruby file.',
  config:                           'Specify configuration file.',
  auto_gen_config:                  ['Generate a configuration file acting as a',
                                     'TODO list.'],
  regenerate_todo:                  ['Regenerate the TODO configuration file using',
                                     'the last configuration. If there is no existing',
                                     'TODO file, acts like --auto-gen-config.'],
  offense_counts:                   ['Include offense counts in configuration',
                                     'file generated by --auto-gen-config.',
                                     'Default is true.'],
  auto_gen_timestamp:
                                    ['Include the date and time when the --auto-gen-config',
                                     'was run in the file it generates. Default is true.'],
  auto_gen_only_exclude:
                                    ['Generate only Exclude parameters and not Max',
                                     'when running --auto-gen-config, except if the',
                                     'number of files with offenses is bigger than',
                                     'exclude-limit. Default is false.'],
  exclude_limit:                    ['Used together with --auto-gen-config to',
                                     'set the limit for how many Exclude',
                                     "properties to generate. Default is #{MAX_EXCL}."],
  disable_uncorrectable:            ['Used with --auto-correct to annotate any',
                                     'offenses that do not support autocorrect',
                                     'with `rubocop:todo` comments.'],
  force_exclusion:                  ['Force excluding files specified in the',
                                     'configuration `Exclude` even if they are',
                                     'explicitly passed as arguments.'],
  only_recognized_file_types:       ['Inspect files given on the command line only if',
                                     'they are listed in AllCops/Include parameters',
                                     'of user configuration or default configuration.'],
  ignore_disable_comments:          ['Run cops even when they are disabled locally',
                                     'with a comment.'],
  ignore_parent_exclusion:          ['Prevent from inheriting AllCops/Exclude from',
                                     'parent folders.'],
  force_default_config:             ['Use default configuration even if configuration',
                                     'files are present in the directory tree.'],
  format:                           ['Choose an output formatter. This option',
                                     'can be specified multiple times to enable',
                                     'multiple formatters at the same time.',
                                     '[p]rogress is used by default',
                                     *FORMATTER_OPTION_LIST.map { |item| "  #{item}" },
                                     '  custom formatter class name'],
  out:                              ['Write output to a file instead of STDOUT.',
                                     'This option applies to the previously',
                                     'specified --format, or the default format',
                                     'if no format is specified.'],
  fail_level:                       ['Minimum severity (A/I/R/C/W/E/F) for exit',
                                     'with error code.'],
  display_time:                     'Display elapsed time in seconds.',
  display_only_failed:              ['Only output offense messages. Omit passing',
                                     'cops. Only valid for --format junit.'],
  display_only_fail_level_offenses:
                                    ['Only output offense messages at',
                                     'the specified --fail-level or above'],
  show_cops:                        ['Shows the given cops, or all cops by',
                                     'default, and their configurations for the',
                                     'current directory.'],
  fail_fast:                        ['Inspect files in order of modification',
                                     'time and stop after the first file',
                                     'containing offenses.'],
  cache:                            ["Use result caching (FLAG=true) or don't",
                                     '(FLAG=false), default determined by',
                                     'configuration parameter AllCops: UseCache.'],
  cache_root:                       ['Set the cache root directory.',
                                     'Takes precedence over the configuration',
                                     'parameter AllCops: CacheRootDirectory and',
                                     'the $RUBOCOP_CACHE_ROOT environment variable.'],
  debug:                            'Display debug info.',
  display_cop_names:                ['Display cop names in offense messages.',
                                     'Default is true.'],
  disable_pending_cops:             'Run without pending cops.',
  display_style_guide:              'Display style guide URLs in offense messages.',
  enable_pending_cops:              'Run with pending cops.',
  extra_details:                    'Display extra details in offense messages.',
  lint:                             'Run only lint cops.',
  safe:                             'Run only safe cops.',
  stderr:                           ['Write all output to stderr except for the',
                                     'autocorrected source. This is especially useful',
                                     'when combined with --auto-correct and --stdin.'],
  list_target_files:                'List all files RuboCop will inspect.',
  auto_correct:                     'Auto-correct offenses (only when it\'s safe).',
  safe_auto_correct:                '(same, deprecated)',
  auto_correct_all:                 'Auto-correct offenses (safe and unsafe)',
  fix_layout:                       'Run only layout cops, with auto-correct on.',
  color:                            'Force color output on or off.',
  version:                          'Display version.',
  verbose_version:                  'Display verbose version.',
  parallel:                         ['Use available CPUs to execute inspection in',
                                     'parallel. Default is true.'],
  stdin:                            ['Pipe source from STDIN, using FILE in offense',
                                     'reports. This is useful for editor integration.'],
  init:                             'Generate a .rubocop.yml file in the current directory.'
}.freeze