1
- # This workflow uses actions that are not certified by GitHub.
2
- # They are provided by a third-party and are governed by
3
- # separate terms of service, privacy policy, and support
4
- # documentation.
5
- # rust-clippy is a tool that runs a bunch of lints to catch common
6
- # mistakes in your Rust code and help improve your Rust code.
7
- # More details at https://github.com/rust-lang/rust-clippy
8
- # and https://rust-lang.github.io/rust-clippy/
9
-
10
1
name : rust-clippy analyze
11
2
12
3
on :
@@ -25,18 +16,18 @@ jobs:
25
16
permissions :
26
17
contents : read
27
18
security-events : write
28
- actions : read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
19
+ actions : read
29
20
steps :
30
- - name : Checkout code
31
- uses : actions/checkout@v4
32
-
33
- - name : Install Rust toolchain
34
- uses : actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # @v1
21
+ - uses : actions/checkout@v4
22
+ - uses : actions/cache@v4
35
23
with :
36
- profile : minimal
37
- toolchain : stable
38
- components : clippy
39
- override : true
24
+ path : |
25
+ ~/.cargo/bin/
26
+ ~/.cargo/registry/index/
27
+ ~/.cargo/registry/cache/
28
+ ~/.cargo/git/db/
29
+ target/
30
+ key : ubuntu-latest-cargo-build-stable-${{ hashFiles('**/Cargo.toml') }}
40
31
41
32
- name : Install required cargo
42
33
run : cargo install clippy-sarif sarif-fmt
49
40
continue-on-error : true
50
41
51
42
- name : Upload analysis results to GitHub
52
- uses : github/codeql-action/upload-sarif@v1
43
+ uses : github/codeql-action/upload-sarif@v3
53
44
with :
54
45
sarif_file : rust-clippy-results.sarif
55
46
wait-for-processing : true
0 commit comments