docs: correct stale script headers and record the config-verify cost (closes #137)
All checks were successful
check / check (push) Successful in 51s

script/bootstrap credited the goimports pin to script/fmt-check, which
runs gofmt only; the header now credits script/fmt. script/cibuild
still described the Dockerfile as running make check, which stopped
being true once linting moved to its own stage. The docker-missing
warning in script/bootstrap is one sentence instead of three fragments
each carrying the bootstrap: prefix. Dockerfile.lint now states the
residual risk of skipping golangci-lint config verify: unknown
top-level keys in .golangci.yml are ignored silently, so a mistyped key
lints clean and applies nothing.

Comment and message text only; no behaviour changes.
This commit is contained in:
2026-08-10 14:09:20 +00:00
parent 168281ad60
commit b8662b8a9c
4 changed files with 24 additions and 7 deletions

View File

@@ -6,7 +6,9 @@
# #
# `golangci-lint config verify` is deliberately NOT run here: it # `golangci-lint config verify` is deliberately NOT run here: it
# fetches its JSON schema over a live, unpinned HTTPS call, which would # fetches its JSON schema over a live, unpinned HTTPS call, which would
# make linting network-dependent and defeat hash-pinning. # make linting network-dependent and defeat hash-pinning. The cost of
# that: unknown top-level keys in .golangci.yml are silently ignored,
# so a mistyped or wrong-schema key lints clean while applying nothing.
# #
# golangci/golangci-lint:v2.12.2 (Debian-based), 2026-08-10 # golangci/golangci-lint:v2.12.2 (Debian-based), 2026-08-10
FROM golangci/golangci-lint:v2.12.2@sha256:5cceeef04e53efe1470638d4b4b4f5ceefd574955ab3941b2d9a68a8c9ad5240 AS deps FROM golangci/golangci-lint:v2.12.2@sha256:5cceeef04e53efe1470638d4b4b4f5ceefd574955ab3941b2d9a68a8c9ad5240 AS deps

14
TODO.md
View File

@@ -23,6 +23,20 @@ Rationale, Design, TODO, License, Author) if any are still missing.
# Completed Steps # Completed Steps
- 2026-08-10: comment-only corrections to `script/bootstrap`,
`script/cibuild`, and `Dockerfile.lint`. The `goimports` pin in
`script/bootstrap` was justified by a claim that `script/fmt-check`
runs it on the host; it does not (it runs `gofmt -l .` only), so the
header now credits `script/fmt` alone. `script/cibuild` still claimed
the `Dockerfile` runs `make check`, which stopped being true when
linting moved to its own stage; it now describes the lint stage
(`make fmt-check` plus `golangci-lint`) and the builder stage
(`make test`, `make build`). The `docker`-missing warning in
`script/bootstrap` reads as one sentence instead of three fragments
each re-prefixed with `bootstrap:`. `Dockerfile.lint` now records the
residual risk of omitting `golangci-lint config verify`: unknown
top-level keys in `.golangci.yml` are silently ignored, so a mistyped
key lints clean while applying nothing. No behaviour changed
- 2026-08-10: MIT `LICENSE` added at the repository root, closing the - 2026-08-10: MIT `LICENSE` added at the repository root, closing the
last gap in `REPO_POLICIES.md`'s required-minimum file list and last gap in `REPO_POLICIES.md`'s required-minimum file list and
removing the all-rights-reserved default that would otherwise have removing the all-rights-reserved default that would otherwise have

View File

@@ -4,7 +4,8 @@
# installed tools are skipped. Base tooling comes from nix, apt, brew, # installed tools are skipped. Base tooling comes from nix, apt, brew,
# or apk (detected in that order); assumes nothing is present. # or apk (detected in that order); assumes nothing is present.
# goimports is installed via `go install` at a pinned commit (never # goimports is installed via `go install` at a pinned commit (never
# "latest") because script/fmt and script/fmt-check run it on the host. # "latest") because script/fmt runs it on the host; script/fmt-check
# does not (it runs gofmt only).
# The linter is NOT installed here: golangci-lint runs via docker only # The linter is NOT installed here: golangci-lint runs via docker only
# (script/lint), pinned by image digest, so its only prerequisite is a # (script/lint), pinned by image digest, so its only prerequisite is a
# working docker. # working docker.
@@ -77,9 +78,8 @@ main() {
# Linting runs via docker only (script/lint). Warn, don't fail: # Linting runs via docker only (script/lint). Warn, don't fail:
# everything except `make lint` works without it. # everything except `make lint` works without it.
if missing docker; then if missing docker; then
echo "bootstrap: WARNING: docker not found; make lint and" >&2 echo "bootstrap: WARNING: docker not found; install it to" \
echo "bootstrap: make docker require it. Install docker to" >&2 "run make lint and make docker." >&2
echo "bootstrap: run the linter." >&2
fi fi
go mod download go mod download

View File

@@ -1,6 +1,7 @@
#!/bin/sh #!/bin/sh
# script/cibuild: run the CI build. The Dockerfile runs make check, so # script/cibuild: run the CI build. The Dockerfile's lint stage runs
# a successful build implies all checks pass. # make fmt-check and golangci-lint; its builder stage runs make test
# and make build. A successful build implies all of those passed.
set -eu set -eu
ROOT="$(cd "$(dirname "$0")/.." && pwd -P)" ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"