chore: reformat tree with cargo fmt and add fmt to CI gate#13
Merged
Conversation
Apply default rustfmt formatting to the entire workspace. No behavior changes — purely mechanical whitespace and line-break adjustments. Reviewers can use `git diff -w` to confirm the diff is bounded to formatting only.
Add a cargo-fmt job to `.github/workflows/ci.yml` that runs `cargo fmt --all -- --check` on every touched-Rust PR. The job follows the same pattern as the existing deny job: `needs: changes`, `if: needs.changes.outputs.rust == 'true'`, `ubuntu-latest`, least-privilege `contents: read`, `actions/checkout@v6` with `persist-credentials: false`, and `dtolnay/rust-toolchain@stable` with the `rustfmt` component. Update `CONTRIBUTING.md` and `.github/PULL_REQUEST_TEMPLATE.md` to replace the bare `cargo fmt --check` mention with the exact CI command (`cargo fmt --all -- --check`) and note that violations block merge.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Apply
cargo fmt --allto the entire workspace (49 files, mechanical whitespace/line-break adjustments only, no behavior changes) and add afmtCI job so formatting drift cannot accumulate again.What changed
src/lib/mlxcel-core/src/**— 25 files reformattedsrc/lib/mlxcel-surgery/src/**— 14 files reformattedsrc/**(top-level models, loading, server, surgery) — 7 files reformattedtests/— 3 integration test files reformatted.github/workflows/ci.yml— newfmtjob:needs: changes, least-privilegecontents: read,dtolnay/rust-toolchain@stablewithrustfmtcomponent,cargo fmt --all -- --checkCONTRIBUTING.md— quality-gate command updated to exact CI invocation with enforcement note.github/PULL_REQUEST_TEMPLATE.md— test-plan checklist updated to note CI enforcementTest plan
cargo fmt --all -- --checkpasses on the reformatted tree (no violations)python3 -c "import yaml; yaml.safe_load(open('.github/workflows/ci.yml'))"— YAML validgit diff -won commit 1 confirms diff is bounded to whitespace and trivial reflowsCloses #4