Module: RuboCop::OptionsHelp

Defined in:
lib/rubocop/options.rb

Overview

This module contains help texts for command line options.

Constant Summary collapse

MAX_EXCL =
RuboCop::Options::DEFAULT_MAXIMUM_EXCLUSION_ITEMS.to_s
TEXT =
{
  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.'],
  no_offense_counts:   ['Do not include offense counts in configuration',
                        'file generated by --auto-gen-config.'],
  exclude_limit:       ['Used together with --auto-gen-config to',
                        'set the limit for how many Exclude',
                        "properties to generate. Default is #{MAX_EXCL}."],
  force_exclusion:     ['Force excluding files specified in the',
                        'configuration `Exclude` even if they are',
                        'explicitly passed as arguments.'],
  format:              ['Choose an output formatter. This option',
                        'can be specified multiple times to enable',
                        'multiple formatters at the same time.',
                        '  [p]rogress (default)',
                        '  [s]imple',
                        '  [c]lang',
                        '  [d]isabled cops via inline comments',
                        '  [fu]ubar',
                        '  [e]macs',
                        '  [j]son',
                        '  [h]tml',
                        '  [fi]les',
                        '  [o]ffenses',
                        '  [w]orst',
                        '  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/R/C/W/E/F) for exit',
                        'with error code.'],
  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.'],
  debug:                'Display debug info.',
  display_cop_names:    'Display cop names in offense messages.',
  display_style_guide:  'Display style guide URLs in offense messages.',
  extra_details:        'Display extra details in offense messages.',
  rails:                'Run extra Rails cops.',
  lint:                 'Run only lint cops.',
  list_target_files:    'List all files RuboCop will inspect.',
  auto_correct:         'Auto-correct offenses.',
  no_color:             'Force color output on or off.',
  version:              'Display version.',
  verbose_version:      'Display verbose version.',
  stdin:                ['Pipe source from STDIN.',
                         'This is useful for editor integration.']
}.freeze