CICD-075 · Reject Rust formatting drift
Encyclopedia · Language build toolchains · All snippets
Previous · CICD-074 · Next · CICD-076
1. Where it fits
- Placement Bash run step following checkout, or equivalent lab terminal.
- Prerequisites source repository with committed build manifest and pinned matching toolchain.
- Platforms local-linux, github-actions, gitea-actions.
2. Copy the snippet
bash
cargo fmt --all -- --check3. How it works
Cargo invokes rustfmt across workspace packages. Check mode reports formatting drift while leaving tracked files untouched.
4. Verify the result
Install rustfmt via the pinned toolchain first.
Validation syntax-validated (Bash parse). Status definitions.