Skip to content

Commit 085b585

Browse files
committed
.github: fix staticcheck linting
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.
1 parent cfa7a51 commit 085b585

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Set up Go
1919
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
2020
with:
21-
go-version: "^1.23"
21+
go-version: "^1.25"
2222
- name: Check formatting
2323
run: |
2424
unformatted=$(gofmt -l .)
@@ -33,7 +33,8 @@ jobs:
3333
- name: Run staticcheck
3434
uses: dominikh/staticcheck-action@024238d2898c874f26d723e7d0ff4308c35589a2 # v1
3535
with:
36-
version: "latest"
36+
install-go: false
37+
version: "v0.6.1"
3738

3839
test:
3940
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)