Skip to content

Commit

Permalink
Deduplicate clippy warning annotations (#10)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Phantomical committed Feb 24, 2024
1 parent 8b9b522 commit 60524b8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/cargo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 60524b8

Please sign in to comment.