From 56f19922fcecf8687640b783a52a2e9c6e586914 Mon Sep 17 00:00:00 2001 From: Phantomical Date: Fri, 23 Feb 2024 22:23:06 -0800 Subject: [PATCH] Deduplicate clippy warning annotations When clippy is used with --message-format json it will emit warnings in the main crate twice. This shows up on github as duplicate warnings which isn't great. This PR just adds a CI step that deduplicates warnings before sending them off to clippy-sarif and sarif-fmt. --- .github/workflows/cargo.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cargo.yml b/.github/workflows/cargo.yml index aa4adde..1398341 100644 --- a/.github/workflows/cargo.yml +++ b/.github/workflows/cargo.yml @@ -79,11 +79,12 @@ jobs: - uses: swlynch99/cargo-sweep-action@v1 - uses: taiki-e/install-action@v2 with: - tool: clippy-sarif,sarif-fmt + tool: clippy-sarif,sarif-fmt,cargo-deduplicate-warnings - name: cargo clippy run: | cargo clippy --all-targets --all-features --message-format json \ + | cargo deduplicate-warnings \ | clippy-sarif \ | tee clippy.sarif \ | sarif-fmt