Adopt golangci-lint v2.12.2 and the canonical .golangci.yml #60
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
maincurrently has no.golangci.ymlat all, sogolangci-lintruns withits built-in defaults. Repo policy requires the standardized, user-owned
config fetched verbatim from the
promptsrepo, and requires every externalreference to be pinned.
This is the first work unit for 1.0 because the lint configuration governs
the gate that every subsequent PR must pass. Nothing else should land ahead
of it.
Definition of done
.golangci.ymlis present in the repo root and is byte-identical tohttps://git.eeqj.de/sneak/prompts/raw/branch/main/.golangci.yml(sha256
021cc83f4e6fc7c31b95b34b846723dfcf20b66b7baeea1dc40406e643346bcb).golangci-lintversion pin isv2.12.2everywhere it appears(
Makefile,Dockerfile), with theDockerfilestage pinned by@sha256:digest and carrying a dated version comment.golangci-lintv2.12.2 under that config isfixed across
cmd/,internal/, andmfer/.docker build .succeeds end-to-end (this is the authoritative gate; itruns the pinned linter, unlike a developer's locally installed one).
TODO.mdis updated in the same commit as the work.Implementation requirements
.golangci.ymlis user-owned and must never be modified. Copy itverbatim; do not add, remove, or reorder a single line to make findings go
away. If a rule is genuinely wrong for this repo, that is an owner
decision — raise it, do not edit the file.
//nolint. Each//nolintthat survives must be narrowly scoped to asingle linter and carry a
//nolint:linter // reasonexplanation. Keep thecount low and be prepared to justify every one.
funlen/cyclop/gocognit/nestifmust be behavior-preserving. Decomposition into helpers is fine;
changing control flow, error semantics, or output is not.
REPO_POLICIES.md. It is a verbatim copy of theauthoritative document in the
promptsrepo and must stay byte-identicalto it. If the repo's formatter rewrites it, that is a separate bug to file,
not something to commit here.
paralleltest/usetestingmust notweaken coverage or introduce cross-test interference. If a test cannot
safely run in parallel, say so in a comment rather than forcing it.
(closes #60).Notes
Local
golangci-lintinstalls are currently unpinned (see the separatebootstrap issue), so a developer machine may report a different finding set
than CI. Trust
docker build ., not the local binary.