Skip to content

Commit

Permalink
Update rust-clippy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Rudxain authored Apr 24, 2024
1 parent c4efdf8 commit 4377160
Showing 1 changed file with 19 additions and 25 deletions.
44 changes: 19 additions & 25 deletions .github/workflows/rust-clippy.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# rust-clippy is a tool that runs a bunch of lints to catch common
# mistakes in your Rust code and help improve your Rust code.
# More details at https://github.com/rust-lang/rust-clippy
# and https://rust-lang.github.io/rust-clippy/
# https://github.com/rust-lang/rust-clippy
# https://rust-lang.github.io/rust-clippy/

name: rust-clippy analyze

Expand All @@ -24,28 +18,28 @@ jobs:
security-events: write
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af #@v1
with:
profile: minimal
toolchain: stable
components: clippy
override: true
- name: Update toolchain
run: rustup update

- name: Install required cargo
- name: Install required crates
run: cargo install clippy-sarif sarif-fmt

- name: Run rust-clippy
run:
cargo clippy
--all-features
--message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
continue-on-error: true
- name: Run clippy
run: |
#!/bin/bash
set -euf
cargo clippy --all-features --message-format=json | \
clippy-sarif | \
tee rust-clippy-results.sarif | \
sarif-fmt
exit ${PIPESTATUS[0]}
- name: Upload analysis results to GitHub
uses: github/codeql-action/upload-sarif@v2
- name: Upload analysis results to GH
# https://stackoverflow.com/a/58859404
if: success() || failure()
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: rust-clippy-results.sarif
wait-for-processing: true

0 comments on commit 4377160

Please sign in to comment.