Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Enable do.sh clippy/test for non-program crates #205

Merged
merged 1 commit into from
Aug 3, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions do.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -57,7 +61,7 @@ perform_action() {
(
cd "$projectDir"
echo "clippy $projectDir"
cargo +nightly clippy --features=program ${@:3}
cargo +nightly clippy $features ${@:3}
)
;;
doc)
Expand Down Expand Up @@ -125,7 +129,7 @@ perform_action() {
(
cd "$projectDir"
echo "test $projectDir"
cargo test --features=program ${@:3}
cargo test $features ${@:3}
)
;;
update)
Expand Down