build: always install pinned lint tools in script/bootstrap (closes #117)
All checks were successful
check / check (push) Successful in 36s
All checks were successful
check / check (push) Successful in 36s
`script/bootstrap` guarded its pinned `go install` calls with `missing()`, which only tests whether a binary is on `PATH`. On any machine that already had some `golangci-lint`, the install was skipped and the commit pin had no effect: a v1.x binary cannot parse this repo's v2-schema `.golangci.yml`, and a different v2.x can silently disagree with CI. The same reasoning made the v2.12.2 pin bump inert on every already-provisioned machine. Install both pinned tools unconditionally. `go install` at a fixed commit ref is idempotent and cheap with a warm module cache, so skipping it saved nothing. The `missing()` presence check is kept for `git`, `make`, and `go`, which really are system-package presence checks. Also warn when `PATH` resolves either tool somewhere other than the directory `go install` writes to, since a shadowing copy earlier on `PATH` is what `make lint` and `make fmt` would actually run. This is a warning, not a failure: the remedy is the user's `PATH`. The pins themselves are unchanged and still match the Dockerfile.
This commit is contained in:
7
TODO.md
7
TODO.md
@@ -25,6 +25,13 @@ confirm make check still passes.
|
||||
|
||||
# Completed Steps
|
||||
|
||||
- 2026-08-09: `script/bootstrap` now installs the pinned `golangci-lint`
|
||||
and `goimports` unconditionally instead of only when the binary is
|
||||
absent from `PATH`, so the commit pins actually take effect on
|
||||
already-provisioned machines; it also warns when `PATH` resolves
|
||||
either tool to a copy outside the directory `go install` writes to.
|
||||
The `missing` presence check is retained for `git`, `make`, and `go`
|
||||
(#117)
|
||||
- 2026-08-07: golangci-lint bumped to v2.12.2 (commit-pinned installs
|
||||
in `Dockerfile` and `script/bootstrap`); `.golangci.yml` set to the
|
||||
org-standard v2-schema config used across the org's repos
|
||||
|
||||
Reference in New Issue
Block a user