Idea detail
rust_fmt
reqlan rq/development/commit.rq:10
Summary
CI runs `cargo fmt --all` in write mode on all crates ( rust_crate_layout, rustfmt.toml ).
Format is a chore, not a gate: an unformatted tree does not fail the job.
On same-repo pull requests, if fmt changes files, CI commits `chore: cargo fmt` and pushes to the PR branch.
Fork PRs and `workflow_call` ( release ) only format the working tree; they do not push.
Recursion stops because: ( 1 ) pushes with the default `GITHUB_TOKEN` do not start new workflow runs; ( 2 ) a second run finds no diff after fmt, so it does not commit again.
Pull requests and the release workflow share the same sequential CI job ( ci_gate ).
Git pre-commit runs the same formatter in write mode so local commits stay formatted.
Skip when no crate Rust is staged, format in place and restage, skip merge / rebase, `SKIP_RUST_FMT=1` escape hatch.
package.json `prepare` sets `core.hooksPath` to `.githooks`.
Navigation
Attributes
| Key | Value |
|---|---|
| implementation | ci.yml, release.yml, pre-commit, pre-commit-rust-fmt.mjs, install-git-hooks.mjs, package.json, rustfmt.toml |
| status | done |
| tests | rust-fmt-hook.test.ts, rust-fmt-hook.test.ts:selects only staged crate rust sources, rust-fmt-hook.test.ts:runs cargo fmt --all in crates then restages the rust files, rust-fmt-hook.test.ts:CI formats crates and auto-commits on same-repo PRs, release-ci-gate.test.ts:release calls sequential CI before versioning |
Ancestor context
No ancestor chain recorded.
Outbound references
Inbound references
| Kind | Idea | Path | Snippet |
|---|---|---|---|
| references | rust_crate_layout | reqlan rq/core_analysis/rust_port.rq | rust_fmt |
| references | ci_gate | reqlan rq/distribution/distribution.rq | rust_fmt |
Unresolved references
| Kind | Idea | Path | Snippet |
|---|---|---|---|
| None | |||
Local graph
Initialising graph…