Lint & Format
rx wraps clippy and rustfmt into unified rx lint and rx fmt commands with configurable severity and a combined rx fix that applies all auto-fixes in one step.
Linting
rx lint # lint with clippy
rx lint --release # lint in release mode
Severity configuration
Control how clippy warnings are treated:
[lint]
severity = "deny" # treat all warnings as errors (default)
severity = "warn" # show warnings but don't fail
severity = "allow" # suppress warnings entirely
Extra lints
Add additional clippy lint groups or specific lints:
[lint]
extra_lints = ["clippy::pedantic", "clippy::nursery"]
These are passed as additional -W flags to clippy.
Formatting
rx fmt # format all code
rx fmt --check # check formatting without modifying files
Extra arguments
Pass additional arguments to rustfmt:
[fmt]
extra_args = ["--edition", "2021"]
Auto-fix everything
rx fix combines all auto-fix capabilities in a single command:
rx fix
This runs, in order:
- Compiler suggestions – applies
rustcfix suggestions - Clippy fixes – applies clippy auto-fix suggestions
- Formatting – runs rustfmt on all files
After running rx fix, your code should be free of all auto-fixable issues.
CI pipeline
rx ci runs the full quality pipeline in order:
rx ci
This executes:
rx fmt --check– verify formattingrx lint– run clippyrx test– run testsrx build– verify build succeeds
Use rx ci locally before pushing to catch issues before CI runs.
Profile overrides
Override lint severity per profile:
[lint]
severity = "warn" # relaxed defaults for local dev
[profile.ci]
lint = { severity = "deny" } # strict in CI
rx --profile ci lint # fails on any warning
Flags reference
rx lint
| Flag | Description |
|---|---|
--release | Lint in release mode |
--verbose | Show detailed clippy output |
--quiet | Suppress non-error output |
rx fmt
| Flag | Description |
|---|---|
--check | Check formatting without modifying files |
--verbose | Show formatted file paths |
--quiet | Suppress non-error output |