Enable do.sh clippy/test for non-program crates
This commit is contained in:
parent
72759b37f9
commit
8c45de5340
8
do.sh
8
do.sh
|
@ -29,6 +29,10 @@ perform_action() {
|
||||||
set -e
|
set -e
|
||||||
projectDir="$PWD"/$2
|
projectDir="$PWD"/$2
|
||||||
targetDir="$projectDir"/target
|
targetDir="$projectDir"/target
|
||||||
|
features=
|
||||||
|
if [[ -f "$projectDir"/Xargo.toml ]]; then
|
||||||
|
features="--features=program"
|
||||||
|
fi
|
||||||
case "$1" in
|
case "$1" in
|
||||||
build)
|
build)
|
||||||
if [[ -f "$projectDir"/Xargo.toml ]]; then
|
if [[ -f "$projectDir"/Xargo.toml ]]; then
|
||||||
|
@ -57,7 +61,7 @@ perform_action() {
|
||||||
(
|
(
|
||||||
cd "$projectDir"
|
cd "$projectDir"
|
||||||
echo "clippy $projectDir"
|
echo "clippy $projectDir"
|
||||||
cargo +nightly clippy --features=program ${@:3}
|
cargo +nightly clippy $features ${@:3}
|
||||||
)
|
)
|
||||||
;;
|
;;
|
||||||
doc)
|
doc)
|
||||||
|
@ -125,7 +129,7 @@ perform_action() {
|
||||||
(
|
(
|
||||||
cd "$projectDir"
|
cd "$projectDir"
|
||||||
echo "test $projectDir"
|
echo "test $projectDir"
|
||||||
cargo test --features=program ${@:3}
|
cargo test $features ${@:3}
|
||||||
)
|
)
|
||||||
;;
|
;;
|
||||||
update)
|
update)
|
||||||
|
|
Loading…
Reference in New Issue