Skip to content

Chore: 30 rustfmt hunks across 6 files, and nothing in CI catches it #1

Description

@anderix

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions