From a5dae3e05481836b2dbf172c88e29f46e20f9679 Mon Sep 17 00:00:00 2001 From: Robert Findley Date: Wed, 22 Oct 2025 14:34:51 -0400 Subject: [PATCH] .github: fix staticcheck linting (#599) Update the test.yml lint job to run linting with Go 1.25, and use the ambient Go command to run staticcheck. This seems to fix a mysterious bug where staticcheck was failing, presumably in the Go installation step. Using the ambient Go command resulted in staticcheck failures, since some symbols are detected as unused at Go 1.23 due to build tags. Upgrading the Go version for this job avoids those errors. Also, use a pinned version of staticcheck (as recommended), to avoid future failures when new versions are released. --- .github/workflows/test.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0366246..68a3c42 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,7 @@ jobs: - name: Set up Go uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5 with: - go-version: "^1.23" + go-version: "^1.25" - name: Check formatting run: | unformatted=$(gofmt -l .) @@ -33,7 +33,8 @@ jobs: - name: Run staticcheck uses: dominikh/staticcheck-action@024238d2898c874f26d723e7d0ff4308c35589a2 # v1 with: - version: "latest" + install-go: false + version: "v0.6.1" test: runs-on: ubuntu-latest