rubocop Command Examples

Lint Ruby files. More information: https://docs.rubocop.org/rubocop/usage/basic_usage.html.

rubocop

rubocop {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}

rubocop --out {{path/to/file}}

rubocop --show-cops

rubocop --except {{cop1 cop2 ...}}

rubocop --only {{cop1 cop2 ...}}

rubocop --auto-correct