Skip to content

Migrate lint job to golangci-lint v2 - #112

Merged
dolph merged 1 commit into
mainfrom
claude/fix-golangci-lint-v2
Oct 12, 2026
Merged

dolph merged 1 commit into
mainfrom
claude/fix-golangci-lint-v2

Conversation

@dolph

@dolph dolph commented Oct 12, 2026

Copy link
Copy Markdown
Owner

Why

The lint check fails on both open pull requests (#105, #109), and would fail on any new one:

What

  • Pin golangci-lint to v2.14.0 in .github/workflows/golangci-lint.yml.
  • Add .golangci.yml (v2 format) enabling the std-error-handling exclusion preset, which restores the v1 default behavior. No code changes.

I chose the preset over sprinkling _ = across 33 call sites (26 of them os.Remove cleanup in tests): it keeps the lint bar exactly where it was before, with no diff noise. If you'd rather tighten errcheck later, removing the preset is a one-line change that deserves its own PR.

Verification

Run locally with golangci-lint v2.14.0: config verify passes, golangci-lint run ./... reports 0 issues, and gofmt, go vet, go build, and go test -race are clean.

After merging

🤖 Generated with Claude Code

https://claude.ai/code/session_01AZrGfLRy5eYPy5v8JjKwrN


Generated by Claude Code

golangci-lint-action v9 refuses to install golangci-lint v1, so the
lint job fails on every pull request with "golangci-lint v1 is not
supported by golangci-lint-action >= v7".

Bump the pinned version to v2.14.0 and add a v2 config that enables
the std-error-handling exclusion preset. golangci-lint v1 applied
those exclusions by default (unchecked Close, os.Remove, fmt.Fprint*
and similar); v2 does not, which surfaces 33 errcheck findings
against unchanged code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AZrGfLRy5eYPy5v8JjKwrN
@dolph dolph added the release:skip label Oct 12, 2026 — with Claude
@dolph
dolph merged commit 8240350 into main Oct 12, 2026
4 checks passed
@dolph
dolph deleted the claude/fix-golangci-lint-v2 branch October 12, 2026 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant