-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cargo fmt and test + prop test added
- Loading branch information
Showing
1 changed file
with
18 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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!" | ||
|
||
|