Skip to content

Commit

Permalink
ci: enable rust Code Scanning using rust clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
jamacku committed May 5, 2023
1 parent de3f811 commit 13fe630
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ jobs:
name: Cargo Clippy
runs-on: ubuntu-22.04

permissions:
security-events: write

steps:
- uses: actions/checkout@v3

Expand All @@ -122,10 +125,21 @@ jobs:
profile: minimal
components: clippy

# https://github.com/psastras/sarif-rs
- name: Install required cargo
run: cargo install clippy-sarif sarif-fmt

- name: Run Clippy
uses: actions-rs/cargo@v1
continue-on-error: true
run: >
cargo clippy
--no-deps
--all-features
--message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
- name: Upload analysis results to GitHub
uses: github/codeql-action/upload-sarif@v2
with:
command: clippy
args: -- --no-deps
sarif_file: rust-clippy-results.sarif

...

0 comments on commit 13fe630

Please sign in to comment.