From c02f7f6e6e075fc585cf9b5a311a0679bffa073f Mon Sep 17 00:00:00 2001 From: Blake Gentry Date: Fri, 21 Aug 2026 19:12:28 -0500 Subject: [PATCH] upgrade golangci-lint to v2.13.1 CI still installs v2.11.4, which predates Go 1.27 support and no longer matches the current local tooling. New linter versions therefore surface compatibility failures only after dependency work reaches CI. Pin CI to v2.13.1 and align the all-linters policy with the replacement names for `exhaustruct` and `gomodguard`. Ignore repeated string findings only in test fixtures, while retaining `goconst` for production code, and apply the formatting cleanup detected by the upgraded `gofumpt`. --- .github/workflows/ci.yaml | 2 +- .golangci.yaml | 7 +++++++ .../internal/prohandler/pro_handler_api_endpoints.go | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0858585e..f2b0d3c8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -90,7 +90,7 @@ jobs: name: Go lint runs-on: ubuntu-latest env: - GOLANGCI_LINT_VERSION: v2.11.4 + GOLANGCI_LINT_VERSION: v2.13.1 GOPROXY: https://proxy.golang.org,https://u:${{ secrets.RIVERPRO_GO_MOD_CREDENTIAL }}@riverqueue.com/goproxy,direct permissions: contents: read diff --git a/.golangci.yaml b/.golangci.yaml index 98fcd09e..f462ce6d 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -4,11 +4,15 @@ linters: default: all disable: + # disabled because they have replacements enabled by default + - gomodguard # replaced by gomodguard_v2 + # disabled, but which we should enable with discussion - wrapcheck # checks that errors are wrapped; currently not done anywhere # disabled because we're not compliant, but which we should think about - exhaustruct # checks that properties in structs are exhaustively defined; may be a good idea + - exhaustruct_v5 # replacement for exhaustruct - testpackage # requires tests in test packages like `river_test` # disabled because they're annoying/bad @@ -50,6 +54,9 @@ linters: - msg: Use built-in `min` function instead. pattern: \bmath\.Min\b + goconst: + ignore-tests: true + gomoddirectives: replace-local: true diff --git a/riverproui/internal/prohandler/pro_handler_api_endpoints.go b/riverproui/internal/prohandler/pro_handler_api_endpoints.go index 19c76811..aa81b1f7 100644 --- a/riverproui/internal/prohandler/pro_handler_api_endpoints.go +++ b/riverproui/internal/prohandler/pro_handler_api_endpoints.go @@ -706,7 +706,7 @@ func (req *workflowListRequest) ExtractRaw(r *http.Request) error { } if state := r.URL.Query().Get("state"); state != "" { - req.State = (state) + req.State = state } return nil