Set the lint digest and .golangci.yml together; state the Go version rule
check / check (push) Successful in 29s
check / check (push) Successful in 29s
The canonical .golangci.yml now names exhaustruct_v5, which v2.12.2 rejects, so a repo that re-vendors the file on the old digest gets a lint phase that fails before checking any code. REPO_POLICIES now says a repo sets the lint phase digest and re-vendors .golangci.yml in one commit, whichever prompted the change, and both repo checklists point to that rule. It also replaces "a new Go version needs a golangci-lint built with it" with the rule golangci-lint applies: the go directive must not name a newer Go minor version than the one it was built with. Model: opus-5-5
This commit is contained in:
@@ -25,7 +25,9 @@ fmt-check, and commit.
|
|||||||
because v2.12.2 refuses to lint a module whose `go` directive is 1.27 (issue
|
because v2.12.2 refuses to lint a module whose `go` directive is 1.27 (issue
|
||||||
65). Releases from v2.13.0 deprecate `exhaustruct` in favour of
|
65). Releases from v2.13.0 deprecate `exhaustruct` in favour of
|
||||||
`exhaustruct_v5`, which `default: all` switches on, so the canonical
|
`exhaustruct_v5`, which `default: all` switches on, so the canonical
|
||||||
`.golangci.yml` now disables `exhaustruct_v5` beside `exhaustruct`.
|
`.golangci.yml` now disables `exhaustruct_v5` beside `exhaustruct`. v2.12.2
|
||||||
|
rejects that file, so `REPO_POLICIES.md` and both repo checklists now say a
|
||||||
|
repo sets the lint phase digest and re-vendors `.golangci.yml` in one commit.
|
||||||
- 2026-10-03: Brought the canonical `.gitignore` level with `.dockerignore` on
|
- 2026-10-03: Brought the canonical `.gitignore` level with `.dockerignore` on
|
||||||
secrets (issue 38): it now also ignores `prod.env`-style `*.env` files,
|
secrets (issue 38): it now also ignores `prod.env`-style `*.env` files,
|
||||||
`.envrc`, `*.p12`, `*.pfx` and the extensionless SSH private keys, written to
|
`.envrc`, `*.p12`, `*.pfx` and the extensionless SSH private keys, written to
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: Existing Repo Checklist
|
title: Existing Repo Checklist
|
||||||
last_modified: 2026-10-02
|
last_modified: 2026-10-03
|
||||||
---
|
---
|
||||||
|
|
||||||
Use this checklist when beginning work in a repo that may not yet conform to our
|
Use this checklist when beginning work in a repo that may not yet conform to our
|
||||||
@@ -80,7 +80,9 @@ with your task.
|
|||||||
`https://git.eeqj.de/sneak/prompts/raw/branch/main/.gitea/workflows/check.yml`
|
`https://git.eeqj.de/sneak/prompts/raw/branch/main/.gitea/workflows/check.yml`
|
||||||
- [ ] Language-specific config:
|
- [ ] Language-specific config:
|
||||||
- [ ] Go: `go.mod`, `go.sum`, `.golangci.yml` (fetch from
|
- [ ] Go: `go.mod`, `go.sum`, `.golangci.yml` (fetch from
|
||||||
`https://git.eeqj.de/sneak/prompts/raw/branch/main/.golangci.yml`)
|
`https://git.eeqj.de/sneak/prompts/raw/branch/main/.golangci.yml` and,
|
||||||
|
in the same commit, set the lint phase digest to the one named in the
|
||||||
|
`.golangci.yml` paragraph of `REPO_POLICIES.md`)
|
||||||
- [ ] JS: `package.json`, `yarn.lock`, `.prettierrc`, `.prettierignore`
|
- [ ] JS: `package.json`, `yarn.lock`, `.prettierrc`, `.prettierignore`
|
||||||
(fetch from
|
(fetch from
|
||||||
`https://git.eeqj.de/sneak/prompts/raw/branch/main/.prettierrc` and
|
`https://git.eeqj.de/sneak/prompts/raw/branch/main/.prettierrc` and
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: New Repo Checklist
|
title: New Repo Checklist
|
||||||
last_modified: 2026-10-02
|
last_modified: 2026-10-03
|
||||||
---
|
---
|
||||||
|
|
||||||
Use this checklist when creating a new repository from scratch. Follow the steps
|
Use this checklist when creating a new repository from scratch. Follow the steps
|
||||||
@@ -94,7 +94,9 @@ Template files can be fetched from:
|
|||||||
`https://git.eeqj.de/sneak/prompts/raw/branch/main/.gitea/workflows/check.yml`
|
`https://git.eeqj.de/sneak/prompts/raw/branch/main/.gitea/workflows/check.yml`
|
||||||
- [ ] Language-specific:
|
- [ ] Language-specific:
|
||||||
- [ ] Go: `go mod init sneak.berlin/go/<name>`, `.golangci.yml` (fetch from
|
- [ ] Go: `go mod init sneak.berlin/go/<name>`, `.golangci.yml` (fetch from
|
||||||
`https://git.eeqj.de/sneak/prompts/raw/branch/main/.golangci.yml`)
|
`https://git.eeqj.de/sneak/prompts/raw/branch/main/.golangci.yml` and,
|
||||||
|
in the same commit, set the lint phase digest to the one named in the
|
||||||
|
`.golangci.yml` paragraph of `REPO_POLICIES.md`)
|
||||||
- [ ] JS: `yarn init`, `yarn add --dev prettier`
|
- [ ] JS: `yarn init`, `yarn add --dev prettier`
|
||||||
- [ ] Python: `pyproject.toml`
|
- [ ] Python: `pyproject.toml`
|
||||||
|
|
||||||
|
|||||||
@@ -454,13 +454,15 @@ style conventions are in separate documents:
|
|||||||
v2.14.0 (released 2026-09-24), pinned as the digest of the lint phase's base
|
v2.14.0 (released 2026-09-24), pinned as the digest of the lint phase's base
|
||||||
image
|
image
|
||||||
(`golangci/golangci-lint@sha256:ad862ba6b3798cbe0fd9fd7408d498fd74fbd2623a92406b2fd3898faf0bf98f`,
|
(`golangci/golangci-lint@sha256:ad862ba6b3798cbe0fd9fd7408d498fd74fbd2623a92406b2fd3898faf0bf98f`,
|
||||||
which reports `2.14.0 built with go1.27.0 from 114493f9`). A golangci-lint
|
which reports `2.14.0 built with go1.27.0 from 114493f9`). A module's `go`
|
||||||
built with go1.26 refuses to lint a module whose `go` directive is 1.27 or
|
directive must not name a newer Go minor version than the one golangci-lint
|
||||||
later, so a new Go version needs a golangci-lint built with it. That digest is
|
was built with, or golangci-lint refuses to lint it: this release lints
|
||||||
the only pin, since no repo installs golangci-lint on the host. A repo moving
|
`go 1.27.1` but not `go 1.28`. That digest is the only pin, since no repo
|
||||||
to a new version changes that digest and re-vendors `.golangci.yml` in the
|
installs golangci-lint on the host. A repo sets the lint phase digest to the
|
||||||
same commit, because a new release can add linters that `default: all`
|
one named here and re-vendors `.golangci.yml` in the same commit, whichever of
|
||||||
switches on until the canonical copy disables them.
|
the two prompted the change: the canonical copy can name linters that an older
|
||||||
|
golangci-lint rejects, and a newer golangci-lint can add linters that
|
||||||
|
`default: all` switches on until the canonical copy disables them.
|
||||||
|
|
||||||
- **`script/bootstrap` installs a pinned tool by comparing versions, never by
|
- **`script/bootstrap` installs a pinned tool by comparing versions, never by
|
||||||
testing presence.** An `if ! command -v <tool>; then install; fi` guard tests
|
testing presence.** An `if ! command -v <tool>; then install; fi` guard tests
|
||||||
|
|||||||
Reference in New Issue
Block a user