Fail if files are not formatted.

Section: Formatting, linting, cleaning

Check formatting in CI

bash
bash
cargo fmt -- --check
Explanation

Common CI guard to enforce formatting.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Formatting, linting, cleaning
Format source code
Run rustfmt across the package.
OpenIn sheetbashsame section
Treat warnings as errors
Fail the lint run on warnings.
OpenIn sheetbashsame section
Run Clippy lints
Analyze code for common mistakes and style issues.
OpenIn sheetbashsame section
Remove build artifacts
Delete the `target` directory for the package.
OpenIn sheetbashsame section
Type-check without producing binaries
Validate code quickly without final artifacts.
OpenIn sheetbash1 tag match
Run the test suite
Build and run tests for the local package.
OpenIn sheetbash1 tag match