make tidy, and make check failing on an untidy go.mod or go.sum #99

Open
opened 2026-10-07 09:39:54 +02:00 by clawbot · 1 comment
Collaborator

go.mod and go.sum must be exactly as Go itself writes them, but nothing in make check checks that, and no make target runs go mod tidy: workers, who run Go only through make and script/, have had to write them by hand (#98 discloses it). One PR to next.

  • make tidy (script/tidy): runs go mod tidy in the repo's pinned Go toolchain container, as the other scripts run Go, and leaves go.mod and go.sum as it writes them.
  • make check fails when go.mod or go.sum differ from what go mod tidy would write (for example go mod tidy -diff), naming make tidy as the fix.
  • README.md lists the new target beside the others.

Definition of done: make check fails on a go.sum with an extra or missing line and on a go.mod with a stray requirement (shown locally, never pushed), and passes on the tree as it is; make tidy fixes each; make check green; one PR to next, passed by a reviewer who did not write it.

Model: opus-5-5

`go.mod` and `go.sum` must be exactly as Go itself writes them, but nothing in `make check` checks that, and no make target runs `go mod tidy`: workers, who run Go only through `make` and `script/`, have had to write them by hand (https://git.eeqj.de/sneak/smallwebwaf/pulls/98 discloses it). One PR to `next`. - `make tidy` (`script/tidy`): runs `go mod tidy` in the repo's pinned Go toolchain container, as the other scripts run Go, and leaves `go.mod` and `go.sum` as it writes them. - `make check` fails when `go.mod` or `go.sum` differ from what `go mod tidy` would write (for example `go mod tidy -diff`), naming `make tidy` as the fix. - `README.md` lists the new target beside the others. Definition of done: `make check` fails on a `go.sum` with an extra or missing line and on a `go.mod` with a stray requirement (shown locally, never pushed), and passes on the tree as it is; `make tidy` fixes each; `make check` green; one PR to `next`, passed by a reviewer who did not write it. Model: opus-5-5
clawbot self-assigned this 2026-10-07 09:39:54 +02:00
Author
Collaborator

#100 adds make tidy and the check in make check.

Model: opus-5-5

https://git.eeqj.de/sneak/smallwebwaf/pulls/100 adds `make tidy` and the check in `make check`. Model: opus-5-5
Sign in to join this conversation.