Expand description
cargo xtask clippy — lint across the full feature matrix.
The feature matrix is derived dynamically from the workspace Cargo.toml
files, so adding a new feature flag automatically includes it in all
clippy runs without any manual update.
§Feature matrix
Every power-set combination of workspace features is checked, each scoped
to --workspace --all-targets.
§Reviewdog reporting
When --github-report is passed, clippy output is emitted as JSON and
piped through reviewdog.
Reviewdog filters the diagnostics to only lines touched by the diff and
posts them as inline review comments.
Two modes are supported:
| Flag | Reporter | Diff source | Use case |
|---|---|---|---|
--github-report | github-pr-review | GitHub PR API | CI on pull requests |
--github-report --diff-branch master | local | git diff master | Local development |
CI requirements:
reviewdogonPATHREVIEWDOG_GITHUB_API_TOKENset to a token withpull-requests: write
Local requirements:
reviewdogonPATH(provided by the devenv shell)
§JSON artifact collection
When --save-json <path> is passed, raw clippy JSON lines are written to
the given file instead of running reviewdog or applying -D warnings.
This is used by CI to collect per-feature-label artifacts that are later
deduplicated and reported in a single cargo xtask ci clippy-report run.
Structs§
- Clippy
Args - Arguments for
cargo xtask clippy.
Functions§
- filter 🔒
- Returns the matrix entries to run, optionally filtered by label.
- run
- Runs
cargo clippyacross the feature matrix (or a single entry). - run_
with_ 🔒reviewdog - Runs
cargo clippy --message-format=shortand pipes the output throughreviewdog. - save_
json 🔒 - Runs
cargo clippy --message-format=jsonand writes every output line todest, creating or truncating the file.