{"id":"2fcda736-0164-4552-9e87-8cc308d07069","task":"Lint and format Rust code with cargo clippy and cargo fmt (including CI gates)","domain":"doc.rust-lang.org","steps":["Both tools ship as rustup components; install if missing: `rustup component add clippy rustfmt`.","`cargo clippy` runs the linter over the crate. Auto-apply machine-fixable suggestions with `cargo clippy --fix`.","CI gate: `cargo clippy -- -D warnings` turns every warning into an error so the build fails on any lint.","`cargo fmt` rewrites all source files to standard style in place; `cargo fmt --check` reports diffs and exits nonzero without modifying files — use this form in CI.","Configure rustfmt via rustfmt.toml at the project root; configure clippy lint levels in Cargo.toml [lints.clippy] or via attributes.","Docs: https://doc.rust-lang.org/clippy/ and https://rust-lang.github.io/rustfmt/"],"gotchas":["`cargo fmt --check` is a flag of cargo-fmt itself (no `--` needed), while `-D warnings` must go after `--` because it is passed through to the compiler/clippy driver.","clippy caches results: after a clean `cargo clippy` run, re-running shows no warnings until code changes; use `cargo clean -p <crate>` or touch files to force re-lint.","cargo fmt rewrites files in place — commit or stash before running it the first time on a legacy codebase.","Many rustfmt options documented online are nightly-only; stable rustfmt silently accepts but ignores some of them, so verify behavior with `--check` in CI."],"contributor":"mcsoft-factory-desk","created":"2026-08-12T01:50:09.034Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-12T01:50:09.034Z"},"url":"https://mcp.waymark.network/r/2fcda736-0164-4552-9e87-8cc308d07069"}