Migrate .golangci.yml from deprecated gomodguard to gomodguard_v2 #57

Closed
opened 2026-08-07 23:14:45 +02:00 by clawbot · 4 comments
Collaborator

Captured action item from the PR #54 rework (golangci-lint v2.12.2 upgrade): the linter prints a deprecation warning that gomodguard is replaced by gomodguard_v2. The warning is config-level and pre-existing on the golangci-v2.12.2 branch.

Definition of done

  1. After PR #54 merges, update .golangci.yml to use gomodguard_v2 with equivalent settings, per the golangci-lint v2.12.2 documentation.
  2. make check green and the authoritative pinned docker lint gate (docker build --target lint .) at 0 issues with no deprecation warnings for this linter.
  3. No behavior change to what the linter enforces (equivalent module-guard rules).

Notes

  • Blocked on PR #54 merging (the v2.12.2 pin and canonical config land there).
  • Repo rule: linter config changes require explicit owner approval — this issue records owner-visible intent; the implementing PR is that approval surface. Owner may close this as wontfix if the deprecated form should be kept until it breaks.
Captured action item from the PR #54 rework (golangci-lint v2.12.2 upgrade): the linter prints a deprecation warning that `gomodguard` is replaced by `gomodguard_v2`. The warning is config-level and pre-existing on the `golangci-v2.12.2` branch. ## Definition of done 1. After PR #54 merges, update `.golangci.yml` to use `gomodguard_v2` with equivalent settings, per the golangci-lint v2.12.2 documentation. 2. `make check` green and the authoritative pinned docker lint gate (`docker build --target lint .`) at 0 issues with no deprecation warnings for this linter. 3. No behavior change to what the linter enforces (equivalent module-guard rules). ## Notes - Blocked on PR #54 merging (the v2.12.2 pin and canonical config land there). - Repo rule: linter config changes require explicit owner approval — this issue records owner-visible intent; the implementing PR is that approval surface. Owner may close this as wontfix if the deprecated form should be kept until it breaks.
clawbot added this to the 1.0.0 milestone 2026-08-09 03:37:51 +02:00
Author
Collaborator

Closing as obsolete: the canonical .golangci.yml that landed with #54 configures neither gomodguard nor gomodguard_v2, so there is nothing to migrate, and that file is not edited outside the canonical source.

model: claude-fable-5

Closing as obsolete: the canonical `.golangci.yml` that landed with https://git.eeqj.de/sneak/pixa/pulls/54 configures neither `gomodguard` nor `gomodguard_v2`, so there is nothing to migrate, and that file is not edited outside the canonical source. model: claude-fable-5
clawbot reopened this issue 2026-09-21 21:59:56 +02:00
Author
Collaborator

Reopened: the warning is still printed on every lint run on next ("The linter 'gomodguard' is deprecated (since v2.12.0) ... Replaced by gomodguard_v2"). The earlier closing note was right that .golangci.yml does not name gomodguard, but the file sets linters.default: all, which switches on every linter including the deprecated one.

Acceptable: the deprecated gomodguard is listed under disable (as wsl already is, for the same reason), gomodguard_v2 stays on through default: all, and a lint run prints no deprecation warning. .golangci.yml is the shared canonical file, so the change is made in the canonical source first and copied here unchanged. Not a beta blocker; to be picked up after the units now in flight.

Model: fable-5-1

Reopened: the warning is still printed on every lint run on `next` ("The linter 'gomodguard' is deprecated (since v2.12.0) ... Replaced by gomodguard_v2"). The earlier closing note was right that `.golangci.yml` does not name `gomodguard`, but the file sets `linters.default: all`, which switches on every linter including the deprecated one. Acceptable: the deprecated `gomodguard` is listed under `disable` (as `wsl` already is, for the same reason), `gomodguard_v2` stays on through `default: all`, and a lint run prints no deprecation warning. `.golangci.yml` is the shared canonical file, so the change is made in the canonical source first and copied here unchanged. Not a beta blocker; to be picked up after the units now in flight. Model: fable-5-1
Author
Collaborator

Plan, checked against next at ba5a716. The canonical .golangci.yml in sneak/prompts now carries the fix (sneak/prompts#25, rolled out by sneak/prompts#60): it disables the deprecated gomodguard, enables gomodguard_v2 with the module block list, and turns on depguard with the rule that keeps net/http/httptest out of code that is not a test. pixa's copy predates that. This unit copies the canonical file in unchanged, following the per-repo steps of sneak/prompts#60:

  • Fetch https://git.eeqj.de/sneak/prompts/raw/branch/main/.golangci.yml as it is, in a commit of its own; no hand edits. pixa has no deny entries of its own to carry forward.
  • make lint (in Docker) prints no deprecation warning at all.
  • Whatever the newly enabled linters report is fixed in the code, in separate commits, never by changing the config or adding //nolint. If they report more than a couple of dozen findings, or something that needs a design decision, stop and say so on this issue.
  • If the canonical file needs a newer golangci-lint than the one pixa pins, the pin moves to the version sneak/prompts names, in the same PR.

Model: opus-5-5

Plan, checked against `next` at `ba5a716`. The canonical `.golangci.yml` in `sneak/prompts` now carries the fix (https://git.eeqj.de/sneak/prompts/issues/25, rolled out by https://git.eeqj.de/sneak/prompts/issues/60): it disables the deprecated `gomodguard`, enables `gomodguard_v2` with the module block list, and turns on `depguard` with the rule that keeps `net/http/httptest` out of code that is not a test. pixa's copy predates that. This unit copies the canonical file in unchanged, following the per-repo steps of https://git.eeqj.de/sneak/prompts/issues/60: - Fetch `https://git.eeqj.de/sneak/prompts/raw/branch/main/.golangci.yml` as it is, in a commit of its own; no hand edits. pixa has no `deny` entries of its own to carry forward. - `make lint` (in Docker) prints no deprecation warning at all. - Whatever the newly enabled linters report is fixed in the code, in separate commits, never by changing the config or adding `//nolint`. If they report more than a couple of dozen findings, or something that needs a design decision, stop and say so on this issue. - If the canonical file needs a newer `golangci-lint` than the one pixa pins, the pin moves to the version `sneak/prompts` names, in the same PR. Model: opus-5-5
Author
Collaborator

Done in #186: .golangci.yml is the canonical copy from sneak/prompts main, fetched unchanged; the tree needed no code changes.

Model: opus-5-5

Done in https://git.eeqj.de/sneak/pixa/pulls/186: `.golangci.yml` is the canonical copy from `sneak/prompts` `main`, fetched unchanged; the tree needed no code changes. 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/pixa#57