Split out of #1, whose own definition of done says to move the lint cleanup into its own issue when it is large. Adding the shared .golangci.yml surfaced about 170 findings in the existing code.
The open question on issue 1 (fix the code, or loosen the shared config) is decided by REPO_POLICIES.md: the vendored .golangci.yml is never modified by an agent and stays byte-identical to the copy in sneak/prompts. So the code is fixed.
Definition of done
.golangci.yml is byte-identical to the one on sneak/promptsnext.
In the same commit, the lint phase of the Dockerfile is based on the golangci-lint v2.14.0 image digest named in the .golangci.yml paragraph of REPO_POLICIES.md (sha256:ad862ba6...), with the version and date comment above it.
Every finding is fixed without changing behaviour: same command-line flags, same output files and file names, same log lines apart from wording a linter forces, same SQL results, same order of operations. A //nolint is allowed only for a finding that is wrong for this code, with the linter named and the reason on the same line.
make check and script/cibuild pass on a fresh clone.
Notes for the implementer
Starts after #1 lands on next: that unit rebuilds the Dockerfile into lint and test phases, and this one changes the lint phase.
A previous attempt, the closed #2, fixed 174 findings against v2.12.2 and the older config. Its commit is still fetchable as refs/pull/2/head (72d052e) and may be used as a starting point; it was never reviewed, so every change in it is checked again here.
The test suite is only a compilation smoke test, so behaviour is preserved by reading, not by tests. Keep each refactor plain: split long functions into named steps, do not redesign them.
Model: opus-5-5
Split out of https://git.eeqj.de/sneak/bsdaily/issues/1, whose own definition of done says to move the lint cleanup into its own issue when it is large. Adding the shared `.golangci.yml` surfaced about 170 findings in the existing code.
The open question on issue 1 (fix the code, or loosen the shared config) is decided by `REPO_POLICIES.md`: the vendored `.golangci.yml` is never modified by an agent and stays byte-identical to the copy in `sneak/prompts`. So the code is fixed.
## Definition of done
1. `.golangci.yml` is byte-identical to the one on `sneak/prompts` `next`.
2. In the same commit, the `lint` phase of the `Dockerfile` is based on the golangci-lint v2.14.0 image digest named in the `.golangci.yml` paragraph of `REPO_POLICIES.md` (`sha256:ad862ba6...`), with the version and date comment above it.
3. Every finding is fixed without changing behaviour: same command-line flags, same output files and file names, same log lines apart from wording a linter forces, same SQL results, same order of operations. A `//nolint` is allowed only for a finding that is wrong for this code, with the linter named and the reason on the same line.
4. `make check` and `script/cibuild` pass on a fresh clone.
## Notes for the implementer
- Starts after https://git.eeqj.de/sneak/bsdaily/issues/1 lands on `next`: that unit rebuilds the `Dockerfile` into lint and test phases, and this one changes the lint phase.
- A previous attempt, the closed https://git.eeqj.de/sneak/bsdaily/pulls/2, fixed 174 findings against v2.12.2 and the older config. Its commit is still fetchable as `refs/pull/2/head` (`72d052e`) and may be used as a starting point; it was never reviewed, so every change in it is checked again here.
- The test suite is only a compilation smoke test, so behaviour is preserved by reading, not by tests. Keep each refactor plain: split long functions into named steps, do not redesign them.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Split out of #1, whose own definition of done says to move the lint cleanup into its own issue when it is large. Adding the shared
.golangci.ymlsurfaced about 170 findings in the existing code.The open question on issue 1 (fix the code, or loosen the shared config) is decided by
REPO_POLICIES.md: the vendored.golangci.ymlis never modified by an agent and stays byte-identical to the copy insneak/prompts. So the code is fixed.Definition of done
.golangci.ymlis byte-identical to the one onsneak/promptsnext.lintphase of theDockerfileis based on the golangci-lint v2.14.0 image digest named in the.golangci.ymlparagraph ofREPO_POLICIES.md(sha256:ad862ba6...), with the version and date comment above it.//nolintis allowed only for a finding that is wrong for this code, with the linter named and the reason on the same line.make checkandscript/cibuildpass on a fresh clone.Notes for the implementer
next: that unit rebuilds theDockerfileinto lint and test phases, and this one changes the lint phase.refs/pull/2/head(72d052e) and may be used as a starting point; it was never reviewed, so every change in it is checked again here.Model: opus-5-5