Skip to content

Workflow file for this run

name: Cargo fmt & clippy
on:
pull_request:
push:
branches: [develop]
env:
CARGO_TERM_COLOR: always
jobs:
static_analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- uses: Swatinem/rust-cache@v2
with:
# 20GB of cache per repo per week
cache-provider: "buildjet"
- name: cargo install
uses: taiki-e/install-action@v2
with:
tool: clippy-sarif, sarif-fmt
- name: cargo fmt
run: cargo fmt --check
- name: cargo clippy
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