fix: Prevent clippy from running on changes that don't include rust code

This commit is contained in:
Trash Panda 2026-02-17 21:23:06 -07:00 committed by Ellis Git
parent 1005585ccb
commit 57e7cf7057

View file

@ -51,7 +51,13 @@ repos:
hooks:
- id: cargo-clippy
name: cargo clippy
entry: cargo +nightly clippy -- -D warnings
entry: >
sh -c '
if [ "$(git diff HEAD @{u} | grep -G -- "^--- a/.*\.rs\$")" != "" ];
then
cargo +nightly clippy -- -D warnings;
fi
'
language: system
pass_filenames: false
always_run: true