From 036c29957e2045d99b9158e95b2e40a2b9743118 Mon Sep 17 00:00:00 2001 From: Sanjit Bhat Date: Wed, 15 May 2024 15:40:16 -0400 Subject: [PATCH] Revert to previous staticcheck pkg pattern According to staticcheck cli docs [1], the pkg pattern is parsed just like in normal Go commands, so `./...` is the right way to test all packages recursively, including test files. This uses the Go version set in `go.mod`, whereas the pattern of "*.go" that we switched to in 477361079a08380287cba68aec3d9482c960310c checks each file independently, which is not what we want. The configuration introduced in this patch will result in staticcheck not catching, for example, the ioutil deprecation that was fixed in 3959ceab5309d1355369e3077af0037ac444443c, because it was not deprecated until Go 1.19, while this package uses Go 1.16. But this is the behavior that we want. [1]: https://staticcheck.dev/docs/getting-started/#running-staticcheck --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 10945d1..3024ee4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,4 +55,4 @@ jobs: - name: Vet run: go vet ./... - name: Staticcheck - run: "staticcheck -f stylish *.go" + run: "staticcheck -f stylish ./..."