Skip to content

fix: revert golangci-lint pin to latest (Go 1.26 compat) - #69

Merged
dunganle merged 1 commit into
mainfrom
fix/golangci-lint-go-version-compat
Apr 16, 2026
Merged

dunganle merged 1 commit into
mainfrom
fix/golangci-lint-go-version-compat

Conversation

@cnewell0

Copy link
Copy Markdown
Contributor

Problem

PR #68 pinned golangci-lint to v2.1.6, but that version was built with Go 1.24. Since this workflow uses go-version: 'stable' (currently Go 1.26.2), golangci-lint panics on every run:

panic: file requires newer Go version go1.26 (application built with go1.24)

This is breaking lint on all repos — e.g., Kochava/mcp#229.

Root cause

Pinning golangci-lint is incompatible with a floating Go version (stable). When Go bumps, the pinned linter falls behind and crashes. We'd have to update the pin every time Go releases a new version.

Fix

Revert version back to latest while keeping only-new-issues: true from #68. This is a reasonable tradeoff because:

After merge

The go/app/v1 tag needs to be moved to the new main HEAD for this to take effect.

🤖 Generated with Claude Code

Pinning to v2.1.6 caused a panic in CI because it was built with Go 1.24
and cannot analyze Go 1.26 code. Since the workflow uses `go-version: stable`
(which floats), pinning golangci-lint will keep breaking on Go updates.

Using `latest` with `only-new-issues: true` is the pragmatic fix:
- `latest` ensures compatibility with whatever Go stable resolves to
- `only-new-issues` mitigates the main risk of `latest` (new lint rules
  only surface on changed code, not the entire codebase)

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@dunganle
dunganle merged commit 409ea4f into main Apr 16, 2026
@dunganle
dunganle deleted the fix/golangci-lint-go-version-compat branch April 16, 2026 09:55
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