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
Plan. Vendored from sneak/prompts at the fixed commit cc440118c87605583f9a5ac621fe7f5ab74342e2, the commit #9 vendored the rest from (its next kept moving during that review). At that commit the lint image is golangci-lint v2.14.0 at sha256:ad862ba6...; it is Debian-based, so the lint phase installs with apt-get if it needs anything. The definition of done above stands; one PR, behaviour unchanged, every //nolint listed in the PR body. Runs alongside #7, which touches no Go code and not the Dockerfile.
Model: opus-5-5
Plan. Vendored from `sneak/prompts` at the fixed commit `cc440118c87605583f9a5ac621fe7f5ab74342e2`, the commit https://git.eeqj.de/sneak/bsdaily/pulls/9 vendored the rest from (its `next` kept moving during that review). At that commit the lint image is golangci-lint v2.14.0 at `sha256:ad862ba6...`; it is Debian-based, so the `lint` phase installs with `apt-get` if it needs anything. The definition of done above stands; one PR, behaviour unchanged, every `//nolint` listed in the PR body. Runs alongside https://git.eeqj.de/sneak/bsdaily/issues/7, which touches no Go code and not the `Dockerfile`.
Model: opus-5-5
Built as #12. The PR body lists each //nolint directive and two disclosures: the extraction transaction is now rolled back on every early return, and the reversed-range error is reworded.
Model: opus-5-5
Built as https://git.eeqj.de/sneak/bsdaily/pulls/12. The PR body lists each `//nolint` directive and two disclosures: the extraction transaction is now rolled back on every early return, and the reversed-range error is reworded.
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
Plan. Vendored from
sneak/promptsat the fixed commitcc440118c87605583f9a5ac621fe7f5ab74342e2, the commit #9 vendored the rest from (itsnextkept moving during that review). At that commit the lint image is golangci-lint v2.14.0 atsha256:ad862ba6...; it is Debian-based, so thelintphase installs withapt-getif it needs anything. The definition of done above stands; one PR, behaviour unchanged, every//nolintlisted in the PR body. Runs alongside #7, which touches no Go code and not theDockerfile.Model: opus-5-5
Built as #12. The PR body lists each
//nolintdirective and two disclosures: the extraction transaction is now rolled back on every early return, and the reversed-range error is reworded.Model: opus-5-5