rubocop

Lint Ruby files.

TLDR

Check all files in the current directory (including subdirectories)

$ rubocop
copy

Check one or more specific files or directories

$ rubocop [path/to/file] [path/to/directory]
copy

Write output to file

$ rubocop --out [path/to/file]
copy

View list of cops (linter rules)

$ rubocop --show-cops
copy

Exclude a cop

$ rubocop --except [cop_1] [cop_2]
copy

Run only specified cops

$ rubocop --only [cop_1] [cop_2]
copy

Auto-correct files (experimental)

$ rubocop --auto-correct
copy

Copied to clipboard
snescontroller