Skip to content

.github: bump golangci-lint to v2.13.1 for Go 1.27 - #3773

Merged
vangent merged 2 commits into
google:masterfrom
stanhu:investigate-golangci-lint-failures
Aug 24, 2026
Merged

.github: bump golangci-lint to v2.13.1 for Go 1.27#3773
vangent merged 2 commits into
google:masterfrom
stanhu:investigate-golangci-lint-failures

Conversation

@stanhu

@stanhu stanhu commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Fix golangci-lint crash on Go 1.27

The golangci-lint workflow installs Go via setup-go with go-version: stable, which now resolves to Go 1.27. golangci-lint v2.12.2 is built with Go 1.26, so its embedded go/types cannot type-check the Go 1.27 standard library and the run panics:

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

golangci-lint v2.13.1 is built with Go 1.27, matching the stable toolchain. It adds no new linters to the default set, and the existing code passes with 0 issues.

Pin workflow actions to commit SHAs

The zizmor mandatory check requires every action reference to be pinned to a full commit SHA rather than a tag. This pins actions/checkout, actions/setup-go, and golangci/golangci-lint-action to the commit each tag resolves to, keeping the tag as a trailing comment.

stanhu added 2 commits August 24, 2026 08:19
The golangci-lint workflow installs Go via setup-go with
go-version: stable, which now resolves to Go 1.27. golangci-lint
v2.12.2 is built with Go 1.26, so its embedded go/types cannot
type-check the Go 1.27 standard library and the run panics:

    file requires newer Go version go1.27 (application built with go1.26)

v2.13.1 is built with Go 1.27, matching the stable toolchain. It
adds no new linters to the default set, and the existing code
passes with 0 issues.
The zizmor mandatory check requires every action reference to be
pinned to a full commit SHA rather than a tag. Pin checkout,
setup-go, and golangci-lint-action to the commit each tag resolves
to, keeping the tag as a trailing comment.
@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.42%. Comparing base (29ba348) to head (1bfaa66).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3773   +/-   ##
=======================================
  Coverage   75.42%   75.42%           
=======================================
  Files         104      104           
  Lines       14267    14267           
=======================================
  Hits        10761    10761           
  Misses       2768     2768           
  Partials      738      738           

☔ View full report in Codecov by Harness.
📢 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.

@vangent
vangent merged commit 12ac9a5 into google:master Aug 24, 2026
13 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