Skip to content

chore: reformat tree with cargo fmt and add fmt to CI gate#13

Merged
inureyes merged 2 commits into
mainfrom
chore/issue-4-cargo-fmt-ci-gate
May 18, 2026
Merged

chore: reformat tree with cargo fmt and add fmt to CI gate#13
inureyes merged 2 commits into
mainfrom
chore/issue-4-cargo-fmt-ci-gate

Conversation

@inureyes
Copy link
Copy Markdown
Member

Summary

Apply cargo fmt --all to the entire workspace (49 files, mechanical whitespace/line-break adjustments only, no behavior changes) and add a fmt CI job so formatting drift cannot accumulate again.

What changed

  • src/lib/mlxcel-core/src/** — 25 files reformatted
  • src/lib/mlxcel-surgery/src/** — 14 files reformatted
  • src/** (top-level models, loading, server, surgery) — 7 files reformatted
  • tests/ — 3 integration test files reformatted
  • .github/workflows/ci.yml — new fmt job: needs: changes, least-privilege contents: read, dtolnay/rust-toolchain@stable with rustfmt component, cargo fmt --all -- --check
  • CONTRIBUTING.md — quality-gate command updated to exact CI invocation with enforcement note
  • .github/PULL_REQUEST_TEMPLATE.md — test-plan checklist updated to note CI enforcement

Test plan

  • cargo fmt --all -- --check passes on the reformatted tree (no violations)
  • python3 -c "import yaml; yaml.safe_load(open('.github/workflows/ci.yml'))" — YAML valid
  • git diff -w on commit 1 confirms diff is bounded to whitespace and trivial reflows

Closes #4

inureyes added 2 commits May 18, 2026 17:24
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.
@inureyes inureyes added type:chore Maintenance tasks (build, CI, etc.) priority:medium Medium priority status:review Under review labels May 18, 2026
@inureyes inureyes merged commit a1b9eaa into main May 18, 2026
4 checks passed
@inureyes inureyes deleted the chore/issue-4-cargo-fmt-ci-gate branch May 18, 2026 08:26
@inureyes inureyes added status:done Completed and removed status:review Under review labels May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority:medium Medium priority status:done Completed type:chore Maintenance tasks (build, CI, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: reformat tree with cargo fmt and add fmt to CI gate

1 participant