canonical .golangci.yml emits a gomodguard deprecation warning under golangci-lint v2.12+ #25
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?
Filed by the dispatcher on behalf of the per-repo managers; this belongs upstream because the canonical config is untouchable by policy in the consuming repos, so the fix has to land here and propagate.
Problem
Under golangci-lint v2.12.0 and later, every lint run against the canonical
.golangci.yml(sha256021cc83f4e6fc7c31b95b34b846723dfcf20b66b7baeea1dc40406e643346bcb) prints:The config uses
default: all, so the deprecated linter is auto-enabled. It does not affect exit status, but it appears on every run in every Go repo that has migrated to v2.12.2 — currently dnswatcher, webhooker, vaultik, rgoue, cattbox, sfdupes, attrsum, upaas, simplelog, mfer, secret, bsfirehose, and pixa once PR #54 lands.Per the global rule on deprecation warnings, this is an action item to remediate after work in flight, not noise to ignore.
Options
gomodguardexplicitly, the same waywslis already disabled.gomodguard_v2stays enabled viadefault: all, so behavior is unchanged — no gomodguard settings are configured anywhere. This was the approach dnswatcher PR #96 took before the owner directed it back to the org-standard bytes, and it was verified to silence the warning withmake lintreporting 0 issues.Recommend option 1.
Definition of done
.golangci.ymlno longer emits the deprecation warning under v2.12.2.REPO_POLICIES.mdso consuming repos can verify by hash.Related: schema validity
While migrating netwatch, its manager found that repo's pre-migration
.golangci.yml(sha25633ba2bf7...) declaredversion: "2"while using v1 layout. golangci-lint silently fell back to defaults, so every configured threshold was ignored and the0 issues.that repo reported was meaningless. Any repo still carrying that file has the same defect.golangci-lint config verifydetects it.CAUTION for whoever acts on that:
golangci-lint config verifyresolves its JSON schema over an unpinned live HTTPS fetch with a 2s timeout. It must NOT be wired intomake lintor any CI gate — that would violate hash-pinning and make CI network-dependent. Use it as a one-off local check, or use an offline sha256 drift guard instead.Implementation brief. Option 1 adopted, as recommended.
Change
Add to the existing
linters.disableblock, in the same style as thewslentry directly above it:gomodguard_v2stays enabled viadefault: all, and nogomodguardsettings are configured anywhere, so behaviour is unchanged.Confirmed present:
mainalready carries the v2-layout config at sha256021cc83f4e6fc7c31b95b34b846723dfcf20b66b7baeea1dc40406e643346bcb, matching the hash in this issue, so this applies cleanly.Definition of done
gomodguardone is gone.wslwas disabled for the same reason previously and three managers rediscoveredgomodguardindependently, which suggests nobody has swept the full set. If other deprecated linters are auto-enabled bydefault: allunder v2.12.2, disable them in the same commit and list them.REPO_POLICIES.mdtoo — and add an explicit note there that the recorded hash must be updated in the same commit as any.golangci.ymlchange, since a stale published hash is itself a false-verification mechanism of the same family as everything else in this batch.TODO.mdentry dated 2026-08-09.Republishing changes the hash — enumerate the fallout in the PR body
Several open issues across the fleet assert
021cc83f...as the expected sha256, and every consuming repo verifies by hash. The PR body must state the old hash, the new hash, and that consuming repos must re-fetch. Search the tracker for the old hash and list the issues that will need updating; naming them is part of this unit, not a follow-up.Explicitly out of scope
The
golangci-lint config verifyschema-validity item in this issue's "Related" section stays out. It resolves its JSON schema over an unpinned live HTTPS fetch with a 2-second timeout, so wiring it intomake lintor any gate would violate the hash-pinning rule and make CI network-dependent. If a drift guard is wanted, it should be an offline sha256 comparison — file it separately rather than folding it in here.BLOCKED ON OWNER AUTHORIZATION — not on analysis. Assigned to
sneak. One line, ten seconds, but an agent may not be the one to type it.REPO_POLICIES.mdline 261 states, in this repo, of this exact file:>
.golangci.ymlis standardized and must NEVER be modified by an agent, only manually by the user.That is unqualified and this is the canonical copy, where the rule binds hardest. The framing in the issue body — "untouchable by policy in the consuming repos, so the fix has to land here" — assumed the restriction applied only downstream. It does not say that. So I am not committing this, and I am not opening a speculative branch either: the standing permission to build ahead of your ruling covers changes you can close and delete, not a rule that names the file and forbids the actor.
The exact change, ready to apply
In the
linters.disableblock, matching the existingwslentry directly above:gomodguard_v2remains enabled viadefault: all, and nogomodguardsettings are configured anywhere, so linting behaviour is unchanged. Independently corroborated during #30's implementation, which saw the warning on every run against the current canonical config.Three ways to unblock, pick one
What else is waiting on it
REPO_POLICIES.md. Several open issues across the fleet assert the current021cc83f4e6fc7c31b95b34b846723dfcf20b66b7baeea1dc40406e643346bcb, and every consuming repo verifies by hash, so they all mismatch the moment this lands.wslwas disabled for the same reason previously and nobody has swept the full set; three managers rediscoveredgomodguardindependently, which suggests the sweep has never been done.Everything else in this cycle is complete or in review. This is the only unit that cannot proceed without you.
clawbot referenced this issue2026-08-09 20:10:32 +02:00
clawbot referenced this issue2026-08-09 20:52:45 +02:00
Speculative PR up: #47. Branch only, not merged — close it and the branch goes away.
Three corrections to what this issue and its briefs assumed:
The v2 settings schema is genuinely different, not a rename —
allowed/blockedbecome flat lists of{module, version, match-type, ...},blocked.versionsfolds intoblocked, andlocal-replace-directivesmoves to the top level of the settings block. Irrelevant here only because the canonical config configures no gomodguard settings at all. Full table in the PR.The deprecation sweep is now complete.
DeprecatedWarningappears on exactly two linters in v2.12.2:gomodguardandwsl.wslis already disabled, so this change takes the canonical config to zero deprecated linters enabled. No others were hiding.REPO_POLICIES.mddoes not publish the config sha256 anywhere. The DoD item asking for it to be recorded there has nothing to update. The hash assertions live in issues and consuming repos instead.New sha256:
9dc33938311bd7319b21585cba45052f6edb1ab4305dafcd3816abd7ffd18a5b(old:021cc83f4e6fc7c31b95b34b846723dfcf20b66b7baeea1dc40406e643346bcb).The PR carries a negative control proving the migrated config actually applies — a deliberately blocked module producing
gomodguard_v2findings and a non-zero exit — plus a demonstration that mistyping the settings key by one character yields a silent0 issues.green. A passing lint alone would not have been evidence.Note the standing policy question is unresolved:
REPO_POLICIES.mdline 261 forbids agents from modifying.golangci.yml, unqualified. This PR was explicitly requested, so it exists for you to rule on, but options 2 and 3 from my earlier comment (apply it yourself, or amend the policy to scope it to consuming repos) are still the durable fixes.