FT-4 Make gofmt a required CI check and format the drifted files #55

Merged
nelson merged 3 commits from ft-4-gofmt-check into main 2026-11-07 17:15:56 -08:00
Owner

https://openproject.romaine.life/wp/FT-4

CI's test job now runs gofmt -l . and fails with the diff when any file is unformatted, and the three files that had drifted on main (tui/style.go, tui/sync.go, tui/tui.go) are formatted. A new .gitattributes checks .go files out as LF on every machine, so the check doesn't depend on a runner's core.autocrlf: Git for Windows installs with it true, and gofmt reports every CRLF file as unformatted. The formatting is whitespace, import order and one added // line, with no behavior change; the gate failing on main's drift is shown on throwaway #54.

https://openproject.romaine.life/wp/FT-4 CI's `test` job now runs `gofmt -l .` and fails with the diff when any file is unformatted, and the three files that had drifted on main (`tui/style.go`, `tui/sync.go`, `tui/tui.go`) are formatted. A new `.gitattributes` checks `.go` files out as LF on every machine, so the check doesn't depend on a runner's `core.autocrlf`: Git for Windows installs with it `true`, and gofmt reports every CRLF file as unformatted. The formatting is whitespace, import order and one added `//` line, with no behavior change; the gate failing on main's drift is shown on throwaway https://forgejo.romaine.life/romaine-life/fzt-terminal/pulls/54.
FT-4 Check gofmt in CI, with Go files checked out as LF
Some checks failed
Build / unix (pull_request) Successful in 21s
Build / windows (pull_request) Successful in 27s
Build / pcs (pull_request) Has been skipped
CI / test (pull_request) Failing after 18s
Build / home-sync (pull_request) Successful in 0s
CI / dll (pull_request) Successful in 38s
bffe20ef71
FT-4 Format tui/style.go, tui/sync.go and tui/tui.go with gofmt
All checks were successful
Build / windows (pull_request) Successful in 29s
Build / unix (pull_request) Successful in 28s
Build / pcs (pull_request) Has been skipped
Build / home-sync (pull_request) Successful in 0s
CI / test (pull_request) Successful in 34s
CI / dll (pull_request) Successful in 29s
000e6ed113
Merge branch 'main' into ft-4-gofmt-check
All checks were successful
Build / windows (pull_request) Successful in 25s
Build / unix (pull_request) Successful in 19s
Build / pcs (pull_request) Has been skipped
Build / home-sync (pull_request) Successful in 0s
CI / test (pull_request) Successful in 29s
CI / dll (pull_request) Successful in 28s
9f56e16f58
nelson merged commit bb68cbcf15 into main 2026-11-07 17:15:56 -08:00
nelson deleted branch ft-4-gofmt-check 2026-11-07 17:15:58 -08:00
Sign in to join this conversation.
No description provided.