You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
giantswarm/devctl PR #1793 (merged 2026-05-06) bumped the embedded golangci-lint version from 2.11.4 to 2.12.2. The new version embeds github.com/jgautheron/goconst v1.10.0 (was v1.8.2 in 2.11.4) and adds a new ignore-tests setting (golangci/golangci-lint#6480 in v2.12.0).
Two things change in practice:
The default goconst behavior is more aggressive. v1.9.0 and v1.10.0 both adjust how literals are counted, so strings that previously didn't qualify as repeated constants now do.
There is no default to ignore test files, so test fixtures that repeat a string 3+ times (very common: "text", "foo", "S256", "Bearer", "https://issuer.example.com") now get flagged.
The languages/go/.pre-commit-config.yaml template enables goconst with -E=goconst and does not pin it down with min-occurrences, min-len, or ignore-tests. So as soon as Align files lands the new zz_generated.pre-commit.yaml in a consumer repo, the pre-commit job goes red across the entire repo's PR queue.
Observed in the 2026-05-07 marge sweep:
Repo
New goconst violations after bump
Outcome
giantswarm/lab
11 (production + test)
Fixable; fixed in giantswarm/lab#77 by extracting constants
giantswarm/muster
947 (mostly test fixtures)
Too large to fix in one rescue agent run; muster Align files PR (#629) blocked
The pattern matches the "Shared CI infrastructure failures (not the dependency)" recipe in klaus-lab/workflows/marge-sweep.md -- a single upstream change cascades to many downstream PR failures.
Proposed solution
Pick one of:
Tune goconst defaults in the shared .pre-commit-config.yaml template to match the v1.8.2 behavior more closely. Either:
Bump min-occurrences higher (e.g. 5 instead of the default 3), and/or
Set ignore-tests: true so test-fixture noise no longer trips the linter.
Set min-len higher (e.g. 5) so single-letter / short strings (auth, dev, text, name) are excluded.
Pin golangci-lint back to 2.11.4 in pkg/gen/input/precommit/ until the goconst v1.10.0 behavior is reviewed and applied intentionally.
Drop goconst from the default -E= args -- it is a stylistic linter that produces high-noise output for code with many small repeated literals (especially in tests). Repos that want it can opt back in via their own .golangci.yml.
Option 1 is the lowest-blast-radius fix. The settings travel through pre_commit_go.yaml / .pre-commit-config.yaml and are picked up automatically when downstream repos receive the next Align files run.
Acceptance criteria
A consumer repo with healthy code (e.g. a clean klaus-lab/lab after fix-PR add shorthand flag for easier use #77 merges) passes the new pre-commit job with golangci-lint 2.12.2 enabled, without per-repo .golangci.yml overrides, and without flagging test-fixture string repetitions.
Existing consumer repos with backlog goconst debt (e.g. muster) do not need a 947-violation fix-PR to unblock their PR queue. Either they stay green by default, or they use a per-repo .golangci.yml that silences the test-fixture noise (which still requires this PR to add the override knob into the template's documented config surface).
A note in CHANGELOG.md mentioning the goconst tuning change so consumers can correlate it with their next Align files run.
Problem
giantswarm/devctlPR #1793 (merged 2026-05-06) bumped the embeddedgolangci-lintversion from2.11.4to2.12.2. The new version embedsgithub.com/jgautheron/goconst v1.10.0(wasv1.8.2in 2.11.4) and adds a newignore-testssetting (golangci/golangci-lint#6480 in v2.12.0).Two things change in practice:
"text","foo","S256","Bearer","https://issuer.example.com") now get flagged.The
languages/go/.pre-commit-config.yamltemplate enables goconst with-E=goconstand does not pin it down withmin-occurrences,min-len, orignore-tests. So as soon as Align files lands the newzz_generated.pre-commit.yamlin a consumer repo, thepre-commitjob goes red across the entire repo's PR queue.Observed in the 2026-05-07 marge sweep:
giantswarm/labgiantswarm/musterThe pattern matches the "Shared CI infrastructure failures (not the dependency)" recipe in
klaus-lab/workflows/marge-sweep.md-- a single upstream change cascades to many downstream PR failures.Proposed solution
Pick one of:
Tune goconst defaults in the shared
.pre-commit-config.yamltemplate to match the v1.8.2 behavior more closely. Either:min-occurrenceshigher (e.g.5instead of the default3), and/orignore-tests: trueso test-fixture noise no longer trips the linter.min-lenhigher (e.g.5) so single-letter / short strings (auth,dev,text,name) are excluded.Pin
golangci-lintback to2.11.4inpkg/gen/input/precommit/until the goconst v1.10.0 behavior is reviewed and applied intentionally.Drop
goconstfrom the default-E=args -- it is a stylistic linter that produces high-noise output for code with many small repeated literals (especially in tests). Repos that want it can opt back in via their own.golangci.yml.Option 1 is the lowest-blast-radius fix. The settings travel through
pre_commit_go.yaml/.pre-commit-config.yamland are picked up automatically when downstream repos receive the next Align files run.Acceptance criteria
klaus-lab/labafter fix-PR add shorthand flag for easier use #77 merges) passes the newpre-commitjob with golangci-lint 2.12.2 enabled, without per-repo.golangci.ymloverrides, and without flagging test-fixture string repetitions..golangci.ymlthat silences the test-fixture noise (which still requires this PR to add the override knob into the template's documented config surface).CHANGELOG.mdmentioning the goconst tuning change so consumers can correlate it with their next Align files run.References
goconst: ignore strings from testsfeature added in v2.12.0.jgautheron/goconst-- the underlying library bumped from v1.8.2 to v1.10.0 between 2.11.x and 2.12.x.