Enforce rustfmt: format src-tauri + add cargo fmt --check to CI#12
Merged
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Runs before test/clippy so a formatting failure surfaces in seconds instead of after the full crate compile. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Pre-existing violation on main (from a todo-update commit) that fails `prettier --check .` in the verify job — unrelated to the Rust changes here, but it blocks this PR's CI. Formatting-only, one line. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
What
Two commits, kept separate so the mechanical diff doesn't obscure the CI change:
style: cargo fmt src-tauri— formatting-only.cargo fmt --checkwas dirty on main (drift inbuild.rs, thecollect_mdarea ofsrc/lib.rs, andsrc/main.rs). No code changes — 108 insertions / 44 deletions, all line-wrapping/indentation.ci: enforce cargo fmt --check in the rust job— addscargo fmt --manifest-path src-tauri/Cargo.toml --checkto the rust job and requestsrustfmtin the toolchain components (dtolnay's action only installs what's listed). Placed first in the cargo-step block, above test/clippy, so a formatting failure surfaces in seconds instead of after the full crate compile.Why
CI runs clippy but never checked formatting, so drift accumulated silently. This clears the existing drift and makes CI catch any new drift.
Verification
cargo fmt --checkclean after formatting (verified with the exact CI invocation from the repo root).cargo test: 23 passed, 0 failed after formatting.🤖 Generated with Claude Code