Skip to content

Commit

Permalink
ci: use GH action for staticcheck
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Lehner <dev@der-flo.net>
  • Loading branch information
florianl committed Sep 8, 2023
1 parent a3f4dea commit af1fa41
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit af1fa41

Please sign in to comment.