Skip to content

Format workspace with cargo fmt and enforce it in CI#303

Merged
sdairs merged 2 commits into
mainfrom
chore-cargo-fmt
Jul 22, 2026
Merged

Format workspace with cargo fmt and enforce it in CI#303
sdairs merged 2 commits into
mainfrom
chore-cargo-fmt

Conversation

@sdairs

@sdairs sdairs commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Closes #302

What

  • Commit 1 is the pure mechanical reformat: cargo fmt --all across the workspace (54 files, no functional changes).
  • Commit 2 adds enforcement:
    • New Format workflow running cargo fmt --all --check on PRs touching **.rs (actions pinned to the same SHAs as the existing workflows).
    • .git-blame-ignore-revs listing the reformat commit so git blame (and GitHub's blame view) skips it.
    • AGENTS.md note that fmt is now CI-enforced.

Why now

We'd been avoiding cargo fmt because it used to break spec_coverage_test.rs, which parsed models.rs as text. The analyzer now parses with syn, which doesn't care about formatting — verified by running the full suite after the reformat.

Verification

  • cargo build --workspace
  • cargo test --workspace — all green, including the analyzer spec-coverage tests
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo check --workspace --all-features
  • cargo fmt --all --check passes

Review tip: commit 1 is noise by construction; review commit 2 by itself.

🤖 Generated with Claude Code

sdairs and others added 2 commits July 22, 2026 12:30
Mechanical reformat, no functional changes. The workspace had never
been rustfmt-formatted; the old blocker (text-based source parsing in
spec_coverage_test.rs) is gone now that the analyzer parses with syn.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Add a Format workflow running cargo fmt --all --check on PRs touching
Rust files, record the bulk reformat commit in .git-blame-ignore-revs,
and document the practice in AGENTS.md.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@sdairs
sdairs requested review from iskakaushik and rndD as code owners July 22, 2026 11:32
@sdairs
sdairs deployed to cloud-integration July 22, 2026 11:32 — with GitHub Actions Active
@sdairs
sdairs merged commit ced8a1a into main Jul 22, 2026
16 checks passed
@sdairs
sdairs deleted the chore-cargo-fmt branch July 22, 2026 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adopt rustfmt: format the workspace and enforce cargo fmt in CI

2 participants