-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (35 loc) · 980 Bytes
/
statis_analysis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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: Machete
uses: bnjbvr/cargo-machete@main
- name: Upload SARIF file
if: always()
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarif