From daa9d164955fabe6220edb30f05f292c8541d948 Mon Sep 17 00:00:00 2001 From: Haim Dimer Date: Mon, 31 Aug 2026 18:24:31 -0700 Subject: [PATCH] ci: bump golangci-lint to v2.13 for Go 1.27 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit golangci-lint v2.7 is built with an older Go and cannot read Go 1.27's export data: export data version 4 is greater than maximum supported version 2 Now that `stable` resolves to 1.27, every stdlib import fails to resolve and the run collapses into a typecheck cascade — including an `errors.go:44:1: missing return` for a function whose last statement is `panic(...)`. The Lint job is red on unrelated PRs as a result. v2.13.0 added Go 1.27 support and v2.13.2 is built with go1.27.0. The bump also turns on govet's new `inline` analyzer, which suggests `reflect.Pointer` over `reflect.Ptr` in three places. `reflect.Pointer` needs Go 1.18 and this module still builds and tests on Go 1.12, so the analyzer is disabled rather than the call sites changed. Worth revisiting whenever the floor moves past 1.18. Verified with golangci-lint 2.13.2: `config verify` and `run` both exit 0, 0 issues; `go test -race ./...` passes. --- .github/workflows/ci.yaml | 2 +- .golangci.yaml | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 18f44259..7230c766 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -51,4 +51,4 @@ jobs: - name: Lint uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0 with: - version: v2.7 + version: v2.13 diff --git a/.golangci.yaml b/.golangci.yaml index 94ce2e02..0236240b 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -8,6 +8,11 @@ linters: - unconvert - unparam settings: + govet: + disable: + # Suggests reflect.Pointer over reflect.Ptr, which needs Go 1.18. + # This module still builds and tests on Go 1.12 (see go.mod). + - inline staticcheck: # Enable all options, with some exceptions. # For defaults, see https://golangci-lint.run/usage/linters/#staticcheck