From 8c45de5340722813411e0ebd8f4d1e12cf0508a5 Mon Sep 17 00:00:00 2001 From: Tyera Eulberg Date: Mon, 3 Aug 2020 16:41:28 -0600 Subject: [PATCH] Enable do.sh clippy/test for non-program crates --- do.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/do.sh b/do.sh index 637cc9af..ffd4f69c 100755 --- a/do.sh +++ b/do.sh @@ -29,6 +29,10 @@ perform_action() { set -e projectDir="$PWD"/$2 targetDir="$projectDir"/target + features= + if [[ -f "$projectDir"/Xargo.toml ]]; then + features="--features=program" + fi case "$1" in build) if [[ -f "$projectDir"/Xargo.toml ]]; then @@ -57,7 +61,7 @@ perform_action() { ( cd "$projectDir" echo "clippy $projectDir" - cargo +nightly clippy --features=program ${@:3} + cargo +nightly clippy $features ${@:3} ) ;; doc) @@ -125,7 +129,7 @@ perform_action() { ( cd "$projectDir" echo "test $projectDir" - cargo test --features=program ${@:3} + cargo test $features ${@:3} ) ;; update)