diff --git a/.agents/skills/archie-build-and-env/SKILL.md b/.agents/skills/archie-build-and-env/SKILL.md index 17e5c319d..3ccb07b2c 100644 --- a/.agents/skills/archie-build-and-env/SKILL.md +++ b/.agents/skills/archie-build-and-env/SKILL.md @@ -54,6 +54,16 @@ failure for formatting. Install the pair from `Dockerfile` than `@latest` for either: on a construct the two versions disagree on, `task fmt` cannot converge `task lint`, and the gate is unsatisfiable. +A rule only one side applies fails the same way, so `task fmt` also passes +`-extra` to match the formatter's `extra-rules`. Both mismatches are +reachable in ordinary code: gofumpt <= v0.9.2 keeps the redundant parens in +`any((Trees)(nil))` that >= v0.10.0 removes, and without `-extra` +`func f(a int, b int)` stays put while `task lint` demands `func f(a, b int)`. +Formatting that only `task lint` can produce is still a real gap -- `gci`'s +`custom-order` places archie-core imports last, where gofumpt sorts them +alphabetically -- so run `golangci-lint fmt` when `task fmt` leaves a +formatting failure standing. + | Surface | Repository declaration | Installed snapshot | Interpretation | |---|---|---|---| | Runtime Go | `go 1.27.0` in `go.mod` | Go 1.27.0, linux/amd64 | Requires at least declared Go level. | @@ -113,7 +123,7 @@ golangci-lint run ./... | Task | Exact effect | |---|---| -| `task fmt` | `gofumpt -w .`, then `go fix ./...` — both may rewrite source. | +| `task fmt` | `gofumpt -extra -w .`, then `go fix ./...` — both may rewrite source. | | `task vet` | `go vet ./...` in the runtime module. | | `task lint` | `golangci-lint run ./...`. | | `task build` | Builds both commands into `bin/`. | diff --git a/Taskfile.yml b/Taskfile.yml index 1fb93c58f..c68e04160 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -12,7 +12,11 @@ tasks: fmt: desc: Format and fix Go source (gofumpt, go fix) cmds: - - gofumpt -w . + # -extra must match the gofumpt formatter's extra-rules in + # .golangci.yml. Without it `task fmt` cannot produce what `task lint` + # demands -- e.g. func f(a int, b int) -> func f(a, b int) -- so a + # contributor has no command that satisfies the gate. + - gofumpt -extra -w . - go fix ./... proto:install: