Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.golangci.ymlfrom v1 syntax to v2 (v1 is built with Go 1.24 and rejects the Go 1.26 toolchain, so CI was failing)..pre-commit-config.yamland.github/workflows/ci.ymlso local hooks and CI agree.hugeParamcheck that fights the resource-by-value design.fmt.Sprintf("%d", x)→strconv.Itoa(x),len(strings.TrimSpace(s)) == 0→s == "", renamemax→maxLento stop shadowing the Go 1.21+ builtin).//nolint:gosecininternal/quartr/config.gofor 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-filesclean locallygo test ./...clean locally🤖 Generated with Claude Code