From f4bea71281b5f97e0acca45512e3358ab2a26302 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Ci=C4=99=C5=BCarkiewicz?= Date: Mon, 18 Nov 2024 14:01:44 -0800 Subject: [PATCH] chore(dev): speed up pre-commit check `target`, `target-nix` and `.git` are not worth looking through and can be quite large. --- .config/flakebox/id | 2 +- misc/git-hooks/pre-commit | 2 +- nix/check-forbidden-deps.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.config/flakebox/id b/.config/flakebox/id index 7f804cb8f1c..f39c5404ab5 100644 --- a/.config/flakebox/id +++ b/.config/flakebox/id @@ -1 +1 @@ -f8574bba32eb0a741153928d8ee13d4f4cfe30a91b9a0f860472fea3e85a9551ff71b39aa51852e7a46628d096219eee4ee3809f888ec88e6b99276207b86fd2 +b9b059bd4917f7871f723d03b6339848449615c05ac21e50db8c74298f396dd8ce6f39aa30b2c1cb9d172331d1f0c7d30a760a99fcb4f71e96d29abc9f40de05 diff --git a/misc/git-hooks/pre-commit b/misc/git-hooks/pre-commit index 025ba14d4d2..f6c364084a6 100755 --- a/misc/git-hooks/pre-commit +++ b/misc/git-hooks/pre-commit @@ -87,7 +87,7 @@ function check_check_forbidden_dependencies() { return 1 fi done - find ./ -name Cargo.lock | while read -r cargo_lock ; do + echo Cargo.lock | while read -r cargo_lock ; do if grep -E "openssl" "$cargo_lock" >&2 ; then >&2 echo "$cargo_lock must not depend on openssl" return 1 diff --git a/nix/check-forbidden-deps.sh b/nix/check-forbidden-deps.sh index 6cb913af896..b9bceff38dd 100755 --- a/nix/check-forbidden-deps.sh +++ b/nix/check-forbidden-deps.sh @@ -22,7 +22,7 @@ find fedimint-client/ -name Cargo.toml | while read -r cargo_toml ; do return 1 fi done -find ./ -name Cargo.lock | while read -r cargo_lock ; do +echo Cargo.lock | while read -r cargo_lock ; do if grep -E "openssl" "$cargo_lock" >&2 ; then >&2 echo "$cargo_lock must not depend on openssl" return 1