File tree Expand file tree Collapse file tree 1 file changed +53
-0
lines changed
Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Original file line number Diff line number Diff line change 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+ name : rust-clippy analyze
11+
12+ on :
13+ push :
14+ branches : [ "main" ]
15+ pull_request :
16+ # The branches below must be a subset of the branches above
17+ branches : [ "main" ]
18+
19+ jobs :
20+ rust-clippy-analyze :
21+ name : Run rust-clippy analyzing
22+ runs-on : ubuntu-latest
23+ permissions :
24+ contents : read
25+ security-events : write
26+ actions : read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
27+ steps :
28+ - name : Checkout code
29+ uses : actions/checkout@v4
30+
31+ - name : Install Rust toolchain
32+ uses : actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # @v1
33+ with :
34+ profile : minimal
35+ toolchain : stable
36+ components : clippy
37+ override : true
38+
39+ - name : Install required cargo
40+ run : cargo install clippy-sarif sarif-fmt
41+
42+ - name : Run rust-clippy
43+ run :
44+ cargo clippy
45+ --all-features
46+ --message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
47+ continue-on-error : true
48+
49+ - name : Upload analysis results to GitHub
50+ uses : github/codeql-action/upload-sarif@v3
51+ with :
52+ sarif_file : rust-clippy-results.sarif
53+ wait-for-processing : true
You can’t perform that action at this time.
0 commit comments