cargo fmt --check currently reports 30 diff hunks across 6 files, and nothing in CI catches it. None of it is a behaviour change — struct literals that fit on one line under an older rustfmt and now want expanding, long calls that want breaking.
| File |
Hunks |
src/verbs.rs |
22 |
src/model.rs |
3 |
src/io.rs |
2 |
src/addr.rs, src/main.rs, tests/reshape.rs |
1 each |
src/verbs.rs carries three quarters of it, mostly the Table { header, rows, delim } literal that every verb constructs on return.
Why it matters: any edit near one of these lines picks up the reformatting as collateral, so a two-line behaviour change arrives as a twenty-line diff and the reviewer has to sort which is which. That already happened once while adding the --delim escape — running cargo fmt to check the new code reformatted the repo, and the fix was to back the whole thing out and re-apply the edit by hand.
Fix: cargo fmt as a standalone commit, touching nothing else, so it can be skipped wholesale with git blame --ignore-rev.
Prevention: .github/workflows/ has deb.yml, publish-crate.yml, and release.yml — all release plumbing, no check that runs on push or PR. That absence is why the drift accumulated silently. A minimal gate:
- name: rustfmt
run: cargo fmt --check
The same drift exists in xled (59 hunks / 17 files, excelano/xled#14); xray and the Go side are the comparison points — xray is clean, and xql has the equivalent gofmt issue filed as excelano/xql#9.
cargo fmt --checkcurrently reports 30 diff hunks across 6 files, and nothing in CI catches it. None of it is a behaviour change — struct literals that fit on one line under an older rustfmt and now want expanding, long calls that want breaking.src/verbs.rssrc/model.rssrc/io.rssrc/addr.rs,src/main.rs,tests/reshape.rssrc/verbs.rscarries three quarters of it, mostly theTable { header, rows, delim }literal that every verb constructs on return.Why it matters: any edit near one of these lines picks up the reformatting as collateral, so a two-line behaviour change arrives as a twenty-line diff and the reviewer has to sort which is which. That already happened once while adding the
--delimescape — runningcargo fmtto check the new code reformatted the repo, and the fix was to back the whole thing out and re-apply the edit by hand.Fix:
cargo fmtas a standalone commit, touching nothing else, so it can be skipped wholesale withgit blame --ignore-rev.Prevention:
.github/workflows/hasdeb.yml,publish-crate.yml, andrelease.yml— all release plumbing, no check that runs on push or PR. That absence is why the drift accumulated silently. A minimal gate:The same drift exists in xled (59 hunks / 17 files, excelano/xled#14); xray and the Go side are the comparison points — xray is clean, and xql has the equivalent gofmt issue filed as excelano/xql#9.