diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 9af0c0e..69fe72e 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -33,12 +33,27 @@ jobs: name: "Cache dependencies" uses: "Swatinem/rust-cache@v2" + - id: "setup-sarif" + name: "Setup SARIF tools" + run: | + cargo install clippy-sarif sarif-fmt + - id: "fmt" name: "Check formatting" run: | cargo fmt --all -- --check - - id: "clippy" - name: "Run clippy" - run: | - cargo clippy -- -D warnings + - id: "run-clippy" + name: "Run Clippy" + run: > + cargo clippy --all-targets --all-features --message-format=json -- -D warnings + | clippy-sarif + | tee results.sarif + | sarif-fmt + + - id: "upload-sarif" + name: "Upload SARIF file" + uses: "github/codeql-action/upload-sarif@v3" + with: + sarif_file: "results.sarif" + category: "rust-clippy"