File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change 22
22
uses : ./.github/workflows/actions/toolchain-and-cache
23
23
with :
24
24
cache-version : ${{ secrets.CACHE_VERSION }}
25
+ cargo-tools : clippy-sarif sarif-fmt
25
26
26
27
- name : Generate cargo doc
27
- run : cargo doc --no-deps -p mithril-stm -p mithril-common -p mithril-aggregator -p mithril-signer -p mithril-client
28
+ run : |
29
+ cargo doc --no-deps -p mithril-stm -p mithril-common -p mithril-aggregator \
30
+ -p mithril-signer -p mithril-client --message-format=json \
31
+ | clippy-sarif | tee rust-cargo-doc-results.sarif | sarif-fmt
32
+
33
+ # Update tool sarif metadata from "clippy" to "cargo-doc" (since it's set this way by clippy-sarif)
34
+ contents=$(cat rust-cargo-doc-results.sarif \
35
+ | jq '.runs[].tool.driver.name = "cargo-doc"' \
36
+ | jq '.runs[].tool.driver.informationUri = "https://doc.rust-lang.org/cargo/commands/cargo-doc.html"' \
37
+ )
38
+ echo -E "${contents}" > rust-cargo-doc-results.sarif
39
+
40
+ # Make this step fail if any warning has been found
41
+ if [[ $(cat rust-cargo-doc-results.sarif | jq '.runs[0].results') != "[]" ]]; then
42
+ false
43
+ fi
44
+
45
+ - name : Upload cargo-doc results to GitHub
46
+ if : success() || failure()
47
+ uses : github/codeql-action/upload-sarif@v2
48
+ with :
49
+ sarif_file : rust-cargo-doc-results.sarif
50
+ wait-for-processing : true
28
51
29
52
- name : Publish Mithril-rust-doc
30
53
uses : actions/upload-artifact@v3
You can’t perform that action at this time.
0 commit comments