Skip to content

ci: upgrade golangci-lint v1.64.8 → v2.12.2 and document install - #78

Merged
MasterOfBinary merged 2 commits into
masterfrom
ci/golangci-lint-v2
May 29, 2026
Merged

ci: upgrade golangci-lint v1.64.8 → v2.12.2 and document install#78
MasterOfBinary merged 2 commits into
masterfrom
ci/golangci-lint-v2

Conversation

@MasterOfBinary

Copy link
Copy Markdown
Owner

Summary

Upgrades golangci-lint from v1.64.8 → v2.12.2 in CI, and documents the install command in CLAUDE.md / AGENTS.md.

Why

  • v1.64.8 is the final v1 release — v1 is EOL. v2 is the maintained line; v2.12.2 is the current latest.
  • Low-risk here: master lints clean (0 issues) under v2.12.2 with v2's default linter set, so no .golangci.yml and no code changes are needed.

Changes

  • .github/workflows/go.yml: install v2.12.2 (was v1.64.8) and fetch install.sh from HEAD instead of the stale master branch (golangci-lint renamed its default branch). The golangci-lint run --timeout=3m step is unchanged — --timeout is still a valid flag in v2.
  • CLAUDE.md / AGENTS.md: add the install command, pinned to the CI version, so contributors run the same linter locally (it was referenced but never documented how to install).

Verification

golangci-lint v2.12.2 run --timeout=3m0 issues on master · go build / go vet / gofmt -l / go test all clean.

🤖 Generated with Claude Code

v1.64.8 is the final v1 release (v1 is EOL); v2 is the maintained line.
Bump the CI install to v2.12.2 (latest) and fetch install.sh from HEAD
instead of the renamed `master` branch. The `golangci-lint run
--timeout=3m` command is unchanged and `--timeout` is still a valid flag
in v2. master lints clean (0 issues) under v2.12.2 with the default linter
set, so no config file or code changes are needed.

Document the install command (pinned to the CI version) in CLAUDE.md and
AGENTS.md so contributors can run the same lint locally.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds instructions to install golangci-lint in AGENTS.md and CLAUDE.md. However, the installation command uses HEAD in the GitHub raw URL, which will result in a 404 error. It is recommended to replace HEAD with main to ensure the installation script can be downloaded successfully.

Comment thread AGENTS.md Outdated
Comment thread CLAUDE.md Outdated
@codecov

codecov Bot commented May 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.79%. Comparing base (66070eb) to head (ad68c51).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #78   +/-   ##
=======================================
  Coverage   96.79%   96.79%           
=======================================
  Files          12       12           
  Lines         374      374           
=======================================
  Hits          362      362           
  Misses          9        9           
  Partials        3        3           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Pin the install script ref to the v2.12.2 tag (instead of HEAD) so the
install script and the installed binary are the same version — fully
reproducible. (HEAD resolves to the default branch and returns 200; this
is for reproducibility, not a fix for a 404.)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@MasterOfBinary
MasterOfBinary merged commit ed01cd7 into master May 29, 2026
2 checks passed
@MasterOfBinary
MasterOfBinary deleted the ci/golangci-lint-v2 branch May 29, 2026 16:07
MasterOfBinary added a commit that referenced this pull request May 29, 2026
Rebased fix/doc-corrections onto master (ba2a756), which merged the
single-use Batch API (#64) and the golangci-lint v2.12.2 install line
(#78) into the same doc files this PR edits.

The rebase auto-merged without textual conflicts, but doc.go required a
genuine three-way reconciliation: master rewrote the package-doc snippet
to the new API (errs, err := b.Go(...); if err != nil { log.Fatal(err) };
batch.IgnoreErrors(errs)) while this PR independently removed the
misleading "// Output:" marker from that same block. Both edits were
combined off the common ancestor, so the result keeps the new API and
drops the marker — no manual conflict markers were ever produced.

Reconciliation outcome:
- Kept master's content: single-use semantics, Go's (<-chan error, error)
  signature, ErrBatchUsed/ErrNilSource, nil-Config default note, the
  removal of IDBufferSize, and the golangci-lint install command.
- Re-applied this PR's still-valid corrections on top: Nil processor now
  documented as sleeping for a Duration (CLAUDE.md/AGENTS.md/README.md),
  errors.As pointer-target guidance (CLAUDE.md/AGENTS.md, verified against
  the &SourceError{}/&ProcessorError{} sends in batch/batch.go), File
  Structure refresh, and the doc.go / source/doc.go "// Output:" cleanups.
- Dropped nothing as redundant: master and this PR touched disjoint
  concerns, so every correction this PR intended still applies.

Verified post-rebase: go build ./..., go vet ./..., golangci-lint
v2.12.2 run --timeout=3m (0 issues), go test ./... (all packages pass,
including the runnable root Example), gofmt -l . empty.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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