2024-08-08 19:43:08 +02:00
|
|
|
name: cargo doc lints
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ "main", "preserve/*" ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ "main", "dev" ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
cargo-doc-lints:
|
|
|
|
name: Run cargo doc for doc lints
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
security-events: write
|
|
|
|
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: Install Rust toolchain
|
|
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
|
|
|
|
- name: Install aditional components for sarif
|
|
|
|
run: cargo install clippy-sarif sarif-fmt
|
|
|
|
|
|
|
|
- name: Run cargo doc
|
|
|
|
run:
|
2024-08-08 19:46:14 +02:00
|
|
|
cargo doc --no-deps --all-features --locked --message-format=json | clippy-sarif | tee cargo-doc-results.sarif | sarif-fmt
|
2024-08-08 19:43:08 +02:00
|
|
|
continue-on-error: true
|
|
|
|
|
|
|
|
- name: Upload analysis results to GitHub
|
|
|
|
uses: github/codeql-action/upload-sarif@v3
|
|
|
|
with:
|
|
|
|
sarif_file: cargo-doc-results.sarif
|
|
|
|
wait-for-processing: true
|