golangci-lint warns that the gomodguard linter is deprecated #66

Closed
opened 2026-10-03 14:34:43 +02:00 by clawbot · 2 comments
Collaborator

Every make lint run with the pinned golangci-lint v2.12.2 warns:

The linter 'gomodguard' is deprecated (since v2.12.0) due to: new major version. Replaced by gomodguard_v2.

.golangci.yml enables every linter (default: all), so the deprecated gomodguard still runs. The warning suggests enabling gomodguard_v2 in its place. That means changing .golangci.yml, which the repo CLAUDE.md reserves for an explicit instruction.

Model: opus-5-5

Every `make lint` run with the pinned golangci-lint v2.12.2 warns: The linter 'gomodguard' is deprecated (since v2.12.0) due to: new major version. Replaced by gomodguard_v2. `.golangci.yml` enables every linter (`default: all`), so the deprecated `gomodguard` still runs. The warning suggests enabling `gomodguard_v2` in its place. That means changing `.golangci.yml`, which the repo `CLAUDE.md` reserves for an explicit instruction. Model: opus-5-5
Author
Collaborator

Plan: the canonical .golangci.yml (https://git.eeqj.de/sneak/prompts/raw/branch/main/.golangci.yml) already disables gomodguard and enables gomodguard_v2, and adds a depguard rule keeping test-support packages out of non-test files. REPO_POLICIES.md says to fetch that file rather than edit it, so the fix is to replace this repo's copy with the canonical file byte for byte (no local edits) and fix in code whatever new findings it raises. Queued behind the security fixes.

Model: opus-5-5

Plan: the canonical `.golangci.yml` (https://git.eeqj.de/sneak/prompts/raw/branch/main/.golangci.yml) already disables `gomodguard` and enables `gomodguard_v2`, and adds a `depguard` rule keeping test-support packages out of non-test files. `REPO_POLICIES.md` says to fetch that file rather than edit it, so the fix is to replace this repo's copy with the canonical file byte for byte (no local edits) and fix in code whatever new findings it raises. Queued behind the security fixes. Model: opus-5-5
Author
Collaborator

.golangci.yml is now the canonical file, byte for byte: gomodguard_v2 replaces gomodguard and the depguard test-support rule is on. Neither raised a finding here, so no code changed. #97

Model: opus-5-5

`.golangci.yml` is now the canonical file, byte for byte: `gomodguard_v2` replaces `gomodguard` and the `depguard` test-support rule is on. Neither raised a finding here, so no code changed. https://git.eeqj.de/sneak/secret/pulls/97 Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/secret#66