CLI Reference¶
Complete reference for all rude commands and options.
rude check¶
Lint Python files and report diagnostics.
rude check [OPTIONS] PATH [PATH ...]
Positional arguments¶
Argument |
Description |
|---|---|
|
One or more files or directories to lint. Directories are scanned recursively for |
Options¶
Option |
Short |
Description |
Default |
|---|---|---|---|
|
Apply automatic fixes in place |
off |
|
|
Enable only these rules or prefixes (comma-separated). Example: |
all rules |
|
|
Exclude these rules or prefixes (comma-separated). Applied after |
none |
|
|
Output format: |
|
|
|
|
Suppress warnings, only show errors |
off |
|
Path to |
auto-discovered |
|
|
|
Number of worker processes. |
|
|
Stop on first error |
off |
|
|
Stop after N errors |
unlimited |
|
|
Override max line length for E501 |
|
|
|
Override max complexity for C901 |
|
|
|
Show full tracebacks on rule errors |
off |
Output formats¶
text (default) — Human-readable with bold rule codes and a [fix] marker
on fixable diagnostics:
src/utils.py:12:0: PAT008 eval() is a security risk [fix]
compact — One diagnostic per line, no colors. Compatible with errorformat
in Vim and similar editors:
src/utils.py:12:0: PAT008 eval() is a security risk
json — JSON Lines format, one object per line:
{"file": "src/utils.py", "line": 12, "column": 0, "code": "PAT008", "message": "eval() is a security risk", "severity": "warning", "fixable": true}
Exit codes¶
Code |
Meaning |
|---|---|
|
No ERROR-severity diagnostics found |
|
At least one ERROR-severity diagnostic found, or no files/rules matched |
WARNING, INFO, and HINT diagnostics do not affect the exit code. Use --quiet
to suppress them entirely and show only ERROR-severity diagnostics.
Alias¶
rude lint is a permanent alias of rude check. Both commands behave
identically; use whichever you prefer.
rude list¶
List all registered rules.
rude list [OPTIONS]
Options¶
Option |
Short |
Description |
Default |
|---|---|---|---|
|
|
Show rule descriptions (first line of docstring) |
off |
Example output¶
Patterns (PAT)
PAT001 TooManyParameters
PAT002 TooManyBranches
...
Global options¶
Option |
Short |
Description |
|---|---|---|
|
|
Print version and exit |
|
|
Print help and exit |