c4797b7b7c 2024-08-11 arcade: # This workflow uses actions that are not certified by GitHub.
c4797b7b7c 2024-08-11 arcade: # They are provided by a third-party and are governed by
c4797b7b7c 2024-08-11 arcade: # separate terms of service, privacy policy, and support
c4797b7b7c 2024-08-11 arcade: # documentation.
c4797b7b7c 2024-08-11 arcade: # rust-clippy is a tool that runs a bunch of lints to catch common
c4797b7b7c 2024-08-11 arcade: # mistakes in your Rust code and help improve your Rust code.
c4797b7b7c 2024-08-11 arcade: # More details at https://github.com/rust-lang/rust-clippy
c4797b7b7c 2024-08-11 arcade: # and https://rust-lang.github.io/rust-clippy/
c4797b7b7c 2024-08-11 arcade:
c4797b7b7c 2024-08-11 arcade: name: rust-clippy analyze
c4797b7b7c 2024-08-11 arcade:
c4797b7b7c 2024-08-11 arcade: on:
2283656bf6 2024-08-11 arcade: push:
2283656bf6 2024-08-11 arcade: branches: [ "master" ]
2283656bf6 2024-08-11 arcade: pull_request:
2283656bf6 2024-08-11 arcade: # The branches below must be a subset of the branches above
2283656bf6 2024-08-11 arcade: branches: [ "master" ]
2283656bf6 2024-08-11 arcade: schedule:
2283656bf6 2024-08-11 arcade: - cron: '43 14 * * 2'
c4797b7b7c 2024-08-11 arcade:
c4797b7b7c 2024-08-11 arcade: jobs:
2283656bf6 2024-08-11 arcade: rust-clippy-analyze:
2283656bf6 2024-08-11 arcade: name: Run rust-clippy analyzing
2283656bf6 2024-08-11 arcade: runs-on: ubuntu-latest
2283656bf6 2024-08-11 arcade: permissions:
2283656bf6 2024-08-11 arcade: contents: read
2283656bf6 2024-08-11 arcade: security-events: write
2283656bf6 2024-08-11 arcade: actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
2283656bf6 2024-08-11 arcade: steps:
2283656bf6 2024-08-11 arcade: - name: Checkout code
2283656bf6 2024-08-11 arcade: uses: actions/checkout@v4
2283656bf6 2024-08-11 arcade:
2283656bf6 2024-08-11 arcade: - name: Install Rust toolchain
2283656bf6 2024-08-11 arcade: uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af #@v1
2283656bf6 2024-08-11 arcade: with:
2283656bf6 2024-08-11 arcade: profile: minimal
2283656bf6 2024-08-11 arcade: toolchain: stable
2283656bf6 2024-08-11 arcade: components: clippy
2283656bf6 2024-08-11 arcade: override: true
2283656bf6 2024-08-11 arcade:
2283656bf6 2024-08-11 arcade: - name: Install required cargo
2283656bf6 2024-08-11 arcade: run: cargo install clippy-sarif sarif-fmt
2283656bf6 2024-08-11 arcade:
2283656bf6 2024-08-11 arcade: - name: Run rust-clippy
2283656bf6 2024-08-11 arcade: run:
2283656bf6 2024-08-11 arcade: cargo clippy
2283656bf6 2024-08-11 arcade: --all-features
2283656bf6 2024-08-11 arcade: --message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
2283656bf6 2024-08-11 arcade: continue-on-error: true
2283656bf6 2024-08-11 arcade:
2283656bf6 2024-08-11 arcade: - name: Upload analysis results to GitHub
2283656bf6 2024-08-11 arcade: uses: github/codeql-action/upload-sarif@v3
2283656bf6 2024-08-11 arcade: with:
2283656bf6 2024-08-11 arcade: sarif_file: rust-clippy-results.sarif
2283656bf6 2024-08-11 arcade: wait-for-processing: true