Skip to content

ci: adopt golangci-lint v2.12.1 and exclude goconst from tests#129

Merged
ChrisJBurns merged 1 commit intomainfrom
ci/golangci-lint-v2.12.1
May 3, 2026
Merged

ci: adopt golangci-lint v2.12.1 and exclude goconst from tests#129
ChrisJBurns merged 1 commit intomainfrom
ci/golangci-lint-v2.12.1

Conversation

@ChrisJBurns
Copy link
Copy Markdown
Collaborator

Summary

  • Pin golangci-lint to v2.12.1 in .github/workflows/lint.yml. The action was unpinned and auto-installing the latest binary, which could break main when v2.12.1 shipped with stricter goconst defaults.
  • Exclude goconst from (.+)_test\.go in .golangci.yml. Test fixtures legitimately repeat literals like "Hello, World!" and "test-agent"; forcing constants there adds noise without value, and matches the existing test-file exclusions for lll, gocyclo, errcheck, dupl, gosec, paralleltest.

No production-code goconst findings in this repo, so unlike the yardstick equivalent (StacklokLabs/yardstick#101) no constants needed extracting from cmd/.

Verified locally with golangci-lint v2.12.1: 0 issues.

Test plan

  • Linting workflow passes on this PR
  • Action logs show Installing golangci-lint binary v2.12.1

🤖 Generated with Claude Code

Pin golangci-lint to v2.12.1 in the lint workflow. The action was
unpinned and auto-installing the latest binary, which could break main
when v2.12.1 shipped with stricter goconst defaults.

Exclude goconst from (.+)_test\.go in .golangci.yml. Test fixtures
legitimately repeat literals like "Hello, World!" and "test-agent";
forcing constants there adds noise without value, and matches the
existing test-file exclusions for lll, gocyclo, errcheck, dupl, gosec,
paralleltest.

Verified locally with golangci-lint v2.12.1: 0 issues.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ChrisJBurns ChrisJBurns enabled auto-merge (squash) May 3, 2026 16:18
@ChrisJBurns ChrisJBurns merged commit 29d0a89 into main May 3, 2026
2 checks passed
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.

2 participants