All apps/RuboCop

RuboCop

rubocop

RuboCop is a Ruby static code analyzer (a.k.a. linter) and code formatter.

Runs as rubocop|macOS, Linux, Windows|rubocop.org

Autocomplete

Fig spec, with what the manifest adds · 59 options
Published once and never changed; check the digest before caching
sha256
4caaabd165559b2e698cefbda43a85f1e4ca99b6bfd3f0e645e55de37a6defec
Size
12640 bytes
OptionsOn rubocop itself
-l--lint
Run only lint cops
-x--fix-layout
Run only layout cops, with autocorrect on
--safe
Run only safe cops
--except
Exclude the given cop(s) <COP>
--only
Run only the given cop(s) <COP>
--only-guide-cops
Run only cops for rules that link to a style guide
-F--fail-fast
Inspect files in order of modification time and stop after the first file containing offenses
--disable-pending-cops
Run without pending cops
--enable-pending-cops
Run with pending cops
--ignore-disable-comments
Run cops even when they are disabled locally by a `rubocop:disable` directive
--force-exclusion
Any files excluded by `Exclude` in configuration files will be excluded, even if given explicitly 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-parent-exclusion
Prevent from inheriting `AllCops/Exclude` from parent folders
--ignore-unrecognized-cops
Ignore unrecognized cops or departments in the config
--force-default-config
Use default configuration even if configuration files are present in the directory tree
--stdin-s
Pipe source from STDIN, using FILE in offense reports. This is useful for editor integration <FILE>
-P--parallel
Use available CPUs to execute inspection in parallel default true
--no-parallel
Disable parallel inspection (default: false)
--fail-level
Minimum severity for exit with error code <SEVERITY>
-C--cache
Use result caching (FLAG=true) or don't (FLAG=false), default determined by configuration parameter AllCops: UseCache <FLAG>
--cache-root
Set the cache root directory. Takes precedence over the configuration parameter AllCops: CacheRootDirectory and the $RUBOCOP_CACHE_ROOT environment variable <DIR>
--no-server
Do not use server even if it's available
--server
If a server process has not been started yet, start the server process and execute inspection with server. Default is true. You can specify the server host and port with the $RUBOCOP_SERVER_HOST and the $RUBOCOP_SERVER_PORT environment variables
--restart-server
Restart server process
--start-server
Start server process
--stop-server
Stop server process
--server-status
Show server status
-f--format
Choose an output formatter. This option can be specified multiple times to enable multiple formatters at the same time <FORMATTER>
-D--display-cop-names
Display cop names in offense messages. Default is true
--no-display-cop-names
Disable displaying cop names in offense messages. Default false
-E--extra-details
Display extra details in offense messages
-S--display-style-guide
Display style guide URLs in offense messages
-o--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 <FILE>
--stderr
Write all output to stderr except for the autocorrected source. This is especially useful when combined with --autocorrect and --stdin
--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
--display-only-correctable
Only output correctable offense messages
--display-only-safe-correctable
Only output safe-correctable offense messages when combined with --display-only-correctable
-a--autocorrect
Autocorrect offenses (only when it's safe)
-A--autocorrect-all
Autocorrect offenses (safe and unsafe)
--disable-uncorrectable
Annotates any offenses that do not support autocorrect with `rubocop:todo` comments
--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
--exclude-limit
Set the limit for how many files to explicitly exclude. If there are more files than the limit, the cop will be disabled instead. Default is 15 <COUNT>
--offense-counts
Include offense counts in configuration file generated by --auto-gen-config. 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
--auto-gen-timestamp
Include the date and time when the --auto-gen-config was run in the file it generates. Default is true
-L--list-target-files
List all files RuboCop will inspect
--show-cops
Shows the given cops, or all cops by default, and their configurations for the current directory <COP>
--show-docs-url
Display url to documentation for the given cops, or base url by default <COP>
--init
Generate a .rubocop.yml file in the current directory
-c--config
Specify configuration file <file>
-d--debug
Display debug info
-r--require
Require Ruby file <file>
--no-color
Disable color output
--color
Force color output
-v--version
Display version
-V--verbose-version
Display verbose version
ArgumentsPositional, in order
<file>
· repeatable · filepaths