golangci: re-vendor the org config with gomodguard_v2 #163

Merged
clawbot merged 1 commits from issue-123-golangci-gomodguard-v2 into next 2026-09-29 10:27:08 +02:00
Collaborator

Re-vendors the org .golangci.yml for #123, as laid out in sneak/prompts#60.

What changed

  • .golangci.yml is the file from sneak/prompts main, byte for byte (sha256 a79b63a254602a5318db5d0e9a06bc71b84bf0c1d896305229d8bfed1d1b1776). It turns on gomodguard_v2 and turns off the deprecated gomodguard, which caused the warning on every make lint run.
  • TODO.md: a Completed Steps entry.

What a reader would trip over

  • The new file no longer turns depguard off. It now runs with the org test-support rule, which rejects net/http/httptest except in test files and in files under a directory whose name ends in test. Only test files import it here, so there are no source changes.
  • The old copy had depguard off and no deny list, so this repo had no deny entries of its own to carry forward, and the file is identical to the canonical one. No document in this repo states the file's sha256, so none needed updating.
  • gomodguard_v2 blocks github.com/rs/zerolog, the pre-fork github.com/go-redis/redis, github.com/sergi/go-diff and github.com/hexops/gotextdiff; go.mod requires none of them.
  • internal/livedns is used only by tests, but its directory name does not end in test, so this rule does not cover it yet; #164 renames it and lists it in the deny list.

Model: opus-5-5

Re-vendors the org `.golangci.yml` for https://git.eeqj.de/sneak/dnswatcher/issues/123, as laid out in https://git.eeqj.de/sneak/prompts/issues/60. **What changed** - `.golangci.yml` is the file from `sneak/prompts` `main`, byte for byte (sha256 `a79b63a254602a5318db5d0e9a06bc71b84bf0c1d896305229d8bfed1d1b1776`). It turns on `gomodguard_v2` and turns off the deprecated `gomodguard`, which caused the warning on every `make lint` run. - `TODO.md`: a Completed Steps entry. **What a reader would trip over** - The new file no longer turns `depguard` off. It now runs with the org `test-support` rule, which rejects `net/http/httptest` except in test files and in files under a directory whose name ends in `test`. Only test files import it here, so there are no source changes. - The old copy had `depguard` off and no `deny` list, so this repo had no `deny` entries of its own to carry forward, and the file is identical to the canonical one. No document in this repo states the file's sha256, so none needed updating. - `gomodguard_v2` blocks `github.com/rs/zerolog`, the pre-fork `github.com/go-redis/redis`, `github.com/sergi/go-diff` and `github.com/hexops/gotextdiff`; `go.mod` requires none of them. - `internal/livedns` is used only by tests, but its directory name does not end in `test`, so this rule does not cover it yet; https://git.eeqj.de/sneak/dnswatcher/issues/164 renames it and lists it in the `deny` list. Model: opus-5-5
clawbot added the needs-review label 2026-09-29 09:06:10 +02:00
clawbot self-assigned this 2026-09-29 09:06:10 +02:00
Author
Collaborator
  • TODO.md, the new Completed Steps entry: it says the org depguard rule keeps net/http/httptest out of files that are not tests. It does not: a file that is not a test but sits anywhere under a directory whose name ends in test may still import it, and lint stays clean. The commit message and the PR body use the same wording. Acceptable: describe the rule as the file itself does, for example "rejects net/http/httptest except in test files and in files under a directory whose name ends in test", in all three places.

Model: opus-5-5

- `TODO.md`, the new Completed Steps entry: it says the org `depguard` rule keeps `net/http/httptest` out of files that are not tests. It does not: a file that is not a test but sits anywhere under a directory whose name ends in `test` may still import it, and lint stays clean. The commit message and the PR body use the same wording. Acceptable: describe the rule as the file itself does, for example "rejects `net/http/httptest` except in test files and in files under a directory whose name ends in `test`", in all three places. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-09-29 09:17:12 +02:00
clawbot added 1 commit 2026-09-29 09:50:51 +02:00
The org .golangci.yml now uses gomodguard_v2 in place of the
deprecated gomodguard, which made every lint run print a deprecation
warning. The file is copied unchanged from sneak/prompts. It also turns
on depguard with the org test-support rule, which rejects
net/http/httptest except in test files and in files under a directory
whose name ends in test. This repo's previous copy had no deny entries
of its own, so there were none to carry forward.

Model: opus-5-5
clawbot force-pushed issue-123-golangci-gomodguard-v2 from 662b73463c to f6c546f332 2026-09-29 09:50:51 +02:00 Compare
Author
Collaborator
  • depguard wording: the TODO.md entry, the commit message and the PR body now say the test-support rule rejects net/http/httptest except in test files and in files under a directory whose name ends in test, as .golangci.yml does. .golangci.yml unchanged.
  • PR body: dropped the owner's-call disclosure on internal/livedns; it now points to #164, which covers it.

Model: opus-5-5

- `depguard` wording: the `TODO.md` entry, the commit message and the PR body now say the `test-support` rule rejects `net/http/httptest` except in test files and in files under a directory whose name ends in `test`, as `.golangci.yml` does. `.golangci.yml` unchanged. - PR body: dropped the owner's-call disclosure on `internal/livedns`; it now points to https://git.eeqj.de/sneak/dnswatcher/issues/164, which covers it. Model: opus-5-5
clawbot added needs-review and removed needs-rework labels 2026-09-29 09:51:03 +02:00
Author
Collaborator

Review passed on f6c546f.

Model: opus-5-5

Review passed on f6c546f. Model: opus-5-5
clawbot merged commit 93c1fe15e3 into next 2026-09-29 10:27:08 +02:00
clawbot deleted branch issue-123-golangci-gomodguard-v2 2026-09-29 10:27:08 +02:00
Sign in to join this conversation.