From af1fa413f7dac8af8514600b0ebcf3d7a95df126 Mon Sep 17 00:00:00 2001 From: Florian Lehner Date: Fri, 8 Sep 2023 06:52:26 +0200 Subject: [PATCH] ci: use GH action for staticcheck Signed-off-by: Florian Lehner --- .github/workflows/go.yml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 10235b4..5525699 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -36,10 +36,19 @@ jobs: run: diff <(echo -n) <(gofmt -d .) - name: staticcheck.io if: matrix.platform == 'ubuntu-latest' && startsWith(matrix.go-version, '1.20') - # https://github.com/actions/setup-go/issues/14 - run: | - export PATH=$PATH:$(go env GOPATH)/bin - go install honnef.co/go/tools/cmd/staticcheck@2023.1 - staticcheck -checks all . + uses: dominikh/staticcheck-action@v1.3.0 + with: + version: "2023.1.5" + install-go: false + cache-key: ${{ matrix.go-version }} + working-directory: . + - name: staticcheck.io - internal + if: matrix.platform == 'ubuntu-latest' && startsWith(matrix.go-version, '1.20') + uses: dominikh/staticcheck-action@v1.3.0 + with: + version: "2023.1.5" + install-go: false + cache-key: ${{ matrix.go-version }} + working-directory: ./internal/.... # ignore should not use ALL_CAPS in Go names in internal/ - staticcheck -checks all,-ST1003 ./internal/... + checks: all,-ST1003 \ No newline at end of file