Skip to content

Commit

Permalink
cargo fmt and test + prop test added
Browse files Browse the repository at this point in the history
  • Loading branch information
lorbax committed Jan 29, 2024
1 parent 7e3e9d4 commit 8268bb7
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions clippy-on-all-workspaces.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,30 @@
#!/bin/sh

WORKSPACES="benches/Cargo.toml common/Cargo.toml protocols/Cargo.toml roles/Cargo.toml
utils/Cargo.toml"
WORKSPACES="benches common protocols roles utils"

for workspace in $WORKSPACES; do
echo "Executing clippy on: $workspace"
cargo clippy --manifest-path="$workspace" -- -D warnings -A dead-code
cargo clippy --manifest-path="$workspace/Cargo.toml" -- -D warnings -A dead-code
if [ $? -ne 0 ]; then
echo "Clippy found some errors in: $workspace"
exit 1
fi

echo "Running tests on: $workspace"
cargo test --manifest-path="$workspace/Cargo.toml"
if [ $? -ne 0 ]; then
echo "Tests failed in: $workspace"
exit 1
fi

echo "Running fmt on: $workspace"
(cd $workspace && cargo +nightly fmt)
if [ $? -ne 0 ]; then
echo "Fmt failed in: $workspace"
exit 1
fi
done

echo "Clippy success!"
echo "Clippy success, all tests passed, cargo fmt applied!"


0 comments on commit 8268bb7

Please sign in to comment.