Skip to content
This repository has been archived by the owner on Jan 4, 2025. It is now read-only.

Commit

Permalink
chore: 📝 Update rust-clippy workflow to ignore certain paths and adju…
Browse files Browse the repository at this point in the history
…st branches for pull requests
  • Loading branch information
M1n-74316D65 committed Aug 10, 2024
1 parent 37a53ed commit 74d61bc
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/rust-clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ name: rust-clippy analyze

on:
push:
branches: [ "master" ]
paths-ignore:
- ".github/**"
- "README.md"
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master" ]
schedule:
- cron: '16 3 * * 2'
branches: ["main"]
types: [ready_for_review, review_requested]

jobs:
rust-clippy-analyze:
Expand All @@ -31,19 +32,16 @@ jobs:
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af #@v1
uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
components: clippy
override: true

- name: Install required cargo
run: cargo install clippy-sarif sarif-fmt

- name: Run rust-clippy
run:
cargo clippy
run: cargo clippy
--all-features
--message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
continue-on-error: true
Expand All @@ -52,4 +50,4 @@ jobs:
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: rust-clippy-results.sarif
wait-for-processing: true
wait-for-processing: true

0 comments on commit 74d61bc

Please sign in to comment.