mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
fix: Prevent clippy from running on changes that don't include rust code
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user