Skip to content

Migrate lint config to golangci-lint v2#1

Merged
arcaputo3 merged 2 commits intomainfrom
ci-lint-fix-go126
May 1, 2026
Merged

Migrate lint config to golangci-lint v2#1
arcaputo3 merged 2 commits intomainfrom
ci-lint-fix-go126

Conversation

@arcaputo3
Copy link
Copy Markdown
Contributor

Summary

  • Migrate .golangci.yml from v1 syntax to v2 (v1 is built with Go 1.24 and rejects the Go 1.26 toolchain, so CI was failing).
  • Bump golangci-lint pin to v2.12.0 in both .pre-commit-config.yaml and .github/workflows/ci.yml so local hooks and CI agree.
  • Trim opinionated linters that fire heavily on stdlib-style Go (varnamelen, goconst, tagliatelle, canonicalheader) and disable the gocritic hugeParam check that fights the resource-by-value design.
  • Apply the small fixes the v2 linter auto-suggested (fmt.Sprintf("%d", x)strconv.Itoa(x), len(strings.TrimSpace(s)) == 0s == "", rename maxmaxLen to stop shadowing the Go 1.21+ builtin).
  • Add a targeted //nolint:gosec in internal/quartr/config.go for the by-design credential storage (G117 fires on the API key field, but persisting it is the whole point).

Test plan

  • pre-commit run --all-files clean locally
  • go test ./... clean locally
  • CI green on this PR

🤖 Generated with Claude Code

arcaputo3 and others added 2 commits May 1, 2026 14:30
v1 series is built with Go 1.24 and rejects the Go 1.26 toolchain target,
so CI was failing on the lint step. Migrate the config to v2 syntax,
bump the pin in pre-commit and CI to v2.12.0, drop a few opinionated
linters (varnamelen, goconst, tagliatelle, canonicalheader) and the
hugeParam gocritic check that conflicts with the resource-by-value
design. Apply the small auto-fixes the v2 linter suggested (perfsprint,
emptyStringTest, builtinShadow rename) and add a targeted gosec
nolint for the by-design credential storage in config.go.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
v6 doesn't accept golangci-lint v2 versions.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@arcaputo3 arcaputo3 merged commit 8ee6d16 into main May 1, 2026
1 check passed
@arcaputo3 arcaputo3 deleted the ci-lint-fix-go126 branch May 1, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant