Skip to content

Commit

Permalink
ci: upload clippy results to code scanning
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanccn committed Oct 26, 2023
1 parent fd55552 commit 00d2940
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,14 @@ on:
pull_request:
branches: ["main"]

permissions:
contents: read

jobs:
clippy:
runs-on: ubuntu-latest
permissions:
security-events: write

steps:
- name: Checkout repository
Expand All @@ -23,8 +28,18 @@ jobs:
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2

- name: Install SARIF tooling
run: cargo install clippy-sarif sarif-fmt

- name: Run clippy
run: cargo clippy --all
run: cargo clippy --all --all-features --message-format=json | clippy-sarif | tee /tmp/result.sarif | sarif-fmt
continue-on-error: true

- name: Upload analysis results
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: /tmp/result.sarif
wait-for-processing: true

rustfmt:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 00d2940

Please sign in to comment.