Skip to content

Commit

Permalink
Update Clippy Workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
0xIchigo committed May 6, 2024
1 parent a4150cd commit 9fed8ac
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,11 @@ jobs:
- name: Install Protobuf Compiler
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler

- name: Get Changed Files
id: files
run: |
echo "::set-output name=list::$(git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | grep '\.rs$')"
- name: Run Clippy
if: steps.files.outputs.list != ''
run: |
for file in ${{ steps.files.outputs.list }}; do
echo "Running clippy on $file"
cargo clippy -- -D warnings -A clippy::all $file || exit 1
done
- name: rust-clippy-check
uses: actions-rs/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: -- -D warnings

- name: Build
run: cargo build --verbose
Expand Down

0 comments on commit 9fed8ac

Please sign in to comment.