diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1c2279b3d..771b368f5 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -35,6 +35,20 @@ jobs: - name: Cargo fmt run: cargo +nightly fmt --check + - name: Install clippy-sarif and sarif-fmt + run: cargo install clippy-sarif sarif-fmt --locked --git https://github.com/psastras/sarif-rs.git --rev 11c33a53f6ffeaed736856b86fb6b7b09fabdfd8 + + - name: Cargo clippy + run: cargo clippy --all-features --tests --message-format=json | + clippy-sarif | tee clippy_result.sarif | sarif-fmt + env: + RUSTFLAGS: "-D warnings" + + - name: Upload Clippy results to GitHub + uses: github/codeql-action/upload-sarif@47b3d888fe66b639e431abf22ebca059152f1eea # v3.24.5 + with: + sarif_file: clippy_result.sarif + - name: Set up Node uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 with: @@ -52,8 +66,3 @@ jobs: run: cargo doc --no-deps --features internal env: RUSTDOCFLAGS: "-D warnings" - - - name: Cargo clippy - run: cargo clippy --all-features --tests - env: - RUSTFLAGS: "-D warnings"