diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f8cc22e..c3bb93a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -32,9 +32,19 @@ jobs: - name: Install clippy run: rustup component add clippy - - name: Run clippy - uses: actions-rs/clippy-check@v1 + - name: Install annotation utils + run: cargo install clippy-sarif sarif-fmt + + - name: Run rust-clippy + run: + cargo clippy + --all --bins --examples --tests --benches --message-format=json -- -Wclippy::all -Dwarnings + | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt + continue-on-error: true + + - name: Upload analysis results to GitHub + uses: github/codeql-action/upload-sarif@v2 with: - token: ${{ secrets.GITHUB_TOKEN }} - args: --all --bins --examples --tests --benches -- -Wclippy::all -Dwarnings + sarif_file: rust-clippy-results.sarif + wait-for-processing: true diff --git a/src/reader.rs b/src/reader.rs index bfff00e..5d5464c 100644 --- a/src/reader.rs +++ b/src/reader.rs @@ -332,8 +332,10 @@ impl StreamState { old_state } - #[allow(clippy::match_like_matches_macro)] // otherwise bumps MSRV + // #[allow(clippy::match_like_matches_macro)] // otherwise bumps MSRV pub fn is_transient(&self) -> bool { + let a_thing = 0usize; + if let StreamState::Events = self { false } else {