Combine staticcheck and upload step

This commit is contained in:
Holger Obermaier
2026-01-23 13:21:54 +01:00
parent 75dd2354f0
commit ea64c377ac

View File

@@ -35,6 +35,7 @@ jobs:
run: |
go install github.com/reviewdog/reviewdog/cmd/reviewdog@latest
# See: https://staticcheck.io
- name: Install staticcheck
run: |
go install honnef.co/go/tools/cmd/staticcheck@latest
@@ -58,19 +59,9 @@ jobs:
run: go vet ./...
# Running the linter requires likwid.h, which gets downloaded in the build step
- name: Run Static Analysis with staticcheck
- name: Run Static Analysis with staticcheck and Upload Report with reviewdog
run: |
staticcheck -f json ./... > staticcheck.json || true
- name: Upload staticcheck Report
uses: actions/upload-artifact@v4
with:
name: staticcheck-json
path: staticcheck.json
- name: Report staticcheck results via reviewdog
run: |
reviewdog -f=staticcheck -name=staticcheck -reporter=github-pr-check -filter-mode=nofilter < staticcheck.json|| true
staticcheck ./... | reviewdog -f=staticcheck -reporter=github-check -filter-mode=nofilter
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}