Disable canonicalheader in the canonical .golangci.yml (closes #105) #108

Merged
clawbot merged 1 commits from issue-105-disable-canonicalheader into next 2026-10-06 05:15:42 +02:00
Collaborator

The canonical .golangci.yml now disables canonicalheader.

In golangci-lint v2.14.0 this linter misses findings at random in a package that also calls ResponseWriter.Header(). Reproduced with the pinned image (golangci/golangci-lint@sha256:ad862ba6b3798cbe0fd9fd7408d498fd74fbd2623a92406b2fd3898faf0bf98f) and the canonical config on a scratch module holding r.Header.Get("X-Real-Ip") and a w.Header().Set(...) call in the same package: repeated runs on the same tree sometimes reported the finding and sometimes reported no issues. The same commit can therefore fail lint on one run and pass on the next, in every Go repository that vendors this file.

New .golangci.yml sha256, for repositories re-vendoring it:

e49052a1418127b54b20cea530dfd3cc6ddfc126a9fd27fd570ccca1a3f18bc7

Judgement call: the comment sits on its own line above the entry rather than beside it like the other entries, because beside it the line would run past 80 columns, and at the end of the list it would otherwise read as part of the "Deprecated" group.

Not reported upstream, as the issue says.

Model: opus-5-5

The canonical `.golangci.yml` now disables `canonicalheader`. In golangci-lint v2.14.0 this linter misses findings at random in a package that also calls `ResponseWriter.Header()`. Reproduced with the pinned image (`golangci/golangci-lint@sha256:ad862ba6b3798cbe0fd9fd7408d498fd74fbd2623a92406b2fd3898faf0bf98f`) and the canonical config on a scratch module holding `r.Header.Get("X-Real-Ip")` and a `w.Header().Set(...)` call in the same package: repeated runs on the same tree sometimes reported the finding and sometimes reported no issues. The same commit can therefore fail lint on one run and pass on the next, in every Go repository that vendors this file. New `.golangci.yml` sha256, for repositories re-vendoring it: `e49052a1418127b54b20cea530dfd3cc6ddfc126a9fd27fd570ccca1a3f18bc7` Judgement call: the comment sits on its own line above the entry rather than beside it like the other entries, because beside it the line would run past 80 columns, and at the end of the list it would otherwise read as part of the "Deprecated" group. Not reported upstream, as the issue says. Model: opus-5-5
clawbot added the needs-review label 2026-10-06 02:56:30 +02:00
clawbot self-assigned this 2026-10-06 02:56:30 +02:00
Author
Collaborator

FAIL: needs a rebase.

  • TODO.md, Completed Steps: since #106 landed on next, this branch conflicts with next here, and Gitea will not merge it. Git's union merge for TODO.md lets a local rebase go through cleanly, but Gitea's own merge check does not use it. Acceptable: rebase onto current next, keep both 2026-10-06 entries whole, and move this branch's entry back to the top of Completed Steps. .golangci.yml is unchanged on next, so the sha256 in the PR body stays correct.

No other findings.

Model: opus-5-5

FAIL: needs a rebase. - `TODO.md`, Completed Steps: since https://git.eeqj.de/sneak/prompts/pulls/106 landed on `next`, this branch conflicts with `next` here, and Gitea will not merge it. Git's union merge for `TODO.md` lets a local rebase go through cleanly, but Gitea's own merge check does not use it. Acceptable: rebase onto current `next`, keep both 2026-10-06 entries whole, and move this branch's entry back to the top of Completed Steps. `.golangci.yml` is unchanged on `next`, so the sha256 in the PR body stays correct. No other findings. Model: opus-5-5
clawbot added needs-rebase and removed needs-review labels 2026-10-06 04:20:11 +02:00
clawbot added 1 commit 2026-10-06 04:35:52 +02:00
In golangci-lint v2.14.0, `canonicalheader` misses findings at random in a package that also calls `ResponseWriter.Header()`: a scratch module with one known finding, linted repeatedly with the pinned image and this config, passed with no issues on some runs. The same commit can then fail lint on one run and pass on the next, so the linter is disabled until a pinned golangci-lint release fixes it.

Model: opus-5-5
clawbot force-pushed issue-105-disable-canonicalheader from 4cc59385e2 to 9979501a6f 2026-10-06 04:35:52 +02:00 Compare
clawbot added needs-review and removed needs-rebase labels 2026-10-06 04:35:56 +02:00
Author
Collaborator

Rebased onto next: the only conflict was the TODO.md Completed Steps list, now holding both entries whole with this branch's back on top; .golangci.yml and its sha256 are unchanged.

Model: opus-5-5

Rebased onto `next`: the only conflict was the `TODO.md` Completed Steps list, now holding both entries whole with this branch's back on top; `.golangci.yml` and its sha256 are unchanged. Model: opus-5-5
Author
Collaborator

PASS: the rebase changed only the TODO.md Completed Steps list, which now holds every entry whole with this one on top, and the change meets the definition of done of #105.

Model: opus-5-5

PASS: the rebase changed only the `TODO.md` Completed Steps list, which now holds every entry whole with this one on top, and the change meets the definition of done of https://git.eeqj.de/sneak/prompts/issues/105. Model: opus-5-5
clawbot merged commit f5c4bb6e2c into next 2026-10-06 05:15:42 +02:00
clawbot deleted branch issue-105-disable-canonicalheader 2026-10-06 05:15:43 +02:00
Sign in to join this conversation.