added recommended cargo.toml keys #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Clippy Check | |
on: | |
push: | |
branches: | |
- "trunk" | |
jobs: | |
clippy: | |
name: Clippy | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
security-events: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2.7.5 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy | |
- name: Install required crates | |
run: cargo install clippy-sarif sarif-fmt | |
- name: Run rust-clippy | |
run: cargo clippy | |
--all-features | |
--message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt | |
continue-on-error: true | |
- name: Upload analysis results to GitHub | |
uses: github/codeql-action/upload-sarif@v3 | |
with: | |
sarif_file: rust-clippy-results.sarif | |
wait-for-processing: true |