Fix after cargo update
#1718
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Cargo Clippy Workflow | |
on: | |
pull_request: | |
push: | |
branches: [master, develop] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
static_analysis: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: sudo apt-get update && sudo apt-get install -y libclang-dev | |
- name: Install latest stable Rust | |
run: | | |
rustup update stable | |
rustup default stable | |
- name: Cache Cargo build | |
uses: Swatinem/rust-cache@v2 | |
with: | |
cache-key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
cache-provider: "actions" | |
- name: Install clippy-sarif and sarif-fmt | |
run: cargo install clippy-sarif sarif-fmt --locked | |
- name: Check code formatting | |
run: cargo fmt -- --check | |
- name: Run cargo clippy | |
env: | |
SKIP_WASM_BUILD: 1 | |
run: | | |
cargo clippy --all-targets --all-features --message-format=json -- -D warnings | clippy-sarif | tee results.sarif | sarif-fmt | |
shell: bash | |
- name: Upload SARIF file | |
if: always() | |
uses: github/codeql-action/upload-sarif@v2 | |
with: | |
sarif_file: results.sarif |