GS/BS
← Standards directory
Formatting

rustfmt.

Keep Rust formatting reproducible

Check formatting across workspace crates with the pinned Rust toolchain. Verify the same edition and formatter configuration used by contributors.

Rust

Community rubric · v1

The evidence

Evidence coverage5 / 8
5 supported · 3 unresolved

One point for each verified check. Unknown means we still need evidence. Contrary evidence records an observed result that goes against the criterion.

Latest evidence review ·

  • Definition

    Verified

    Rustfmt formats Rust source under the configured style edition. Upstream documents limitations, including some macro inputs.

    Cited source ↗
  • Measurement

    Verified

    --check compares input against Rustfmt's output and reports changes without rewriting files.

    Cited source ↗
  • Conformance

    Unknown

    No reviewed evidence is recorded for this dimension.

    What would demonstrate a violation? Contribute evidence ↗

  • CI enforcement

    Verified

    Upstream documents using cargo fmt --all -- --check under CI, with exit 0 for unchanged formatting.

    Cited source ↗
  • Getting started

    Verified

    Upstream documents installing the rustup component and running cargo fmt on a Cargo project. The check-mode section explains what unchanged and unformatted inputs return.

    Cited source ↗
  • Real-world adoption

    Verified

    Seikika’s Rust workspace workflow runs cargo fmt --all --check before Clippy and tests.

    Cited source ↗
  • Agent guidance

    Unknown

    No reviewed evidence is recorded for this dimension.

    Can an agent act on a specific finding? Contribute evidence ↗

  • Agent portability

    Unknown

    No reviewed evidence is recorded for this dimension.

    Does the practice work in two agent harnesses? Contribute evidence ↗

Use this standard

Run the check with the tool installed and configured for your project.

cargo fmt --all -- --check

Agent prompt

Use rustfmt in this repository to meet this standard: Keep Rust formatting reproducible. Check formatting across workspace crates with the pinned Rust toolchain. Verify the same edition and formatter configuration used by contributors. Inspect the repository configuration, record the baseline and exact reproduction steps, then add the smallest repeatable check that detects a regression.
Read the agent skill ↗

Primary source

rustfmt documentation ↗