Skip to content

rust-clippy analyze #1140

rust-clippy analyze

rust-clippy analyze #1140

Workflow file for this run

# SPDX-FileCopyrightText: 2023 MTRNord
#
# SPDX-License-Identifier: CC0-1.0
name: rust-clippy analyze
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: "35 12 * * 3"
permissions: # added using https://github.com/step-security/secure-workflows
contents: read
jobs:
rust-clippy-analyze:
name: Run rust-clippy analyzing
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423
with:
egress-policy: block
allowed-endpoints: >
api.github.com:443
artifactcache.actions.githubusercontent.com:443
crates.io:443
index.crates.io:443
frsnacprodeus2file1.blob.core.windows.net:443
github.com:443
static.crates.io:443
static.rust-lang.org:443
index.crates.io:443
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Install Rust toolchain
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af #@v1
with:
profile: minimal
toolchain: nightly
components: clippy
override: true
- uses: Swatinem/rust-cache@81d053bdb0871dcd3f10763c8cc60d0adc41762b
- name: Install required cargo
run: cargo install clippy-sarif sarif-fmt
- name: Run rust-clippy
run: cargo +nightly 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@74483a38d39275f33fcff5f35b679b5ca4a26a99
with:
sarif_file: rust-clippy-results.sarif
wait-for-processing: true