Skip to content

Commit

Permalink
chore: adjust wrong clippy.sh file.
Browse files Browse the repository at this point in the history
  • Loading branch information
devworlds committed Jan 6, 2025
1 parent 9f9f881 commit e62691c
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 37 deletions.
28 changes: 28 additions & 0 deletions scripts/clippy-fmt-and-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/sh

WORKSPACES="benches common protocols roles utils"

for workspace in $WORKSPACES; do
echo "Executing clippy on: $workspace"
cargo +1.75.0 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 +1.75 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, all tests passed!"
10 changes: 0 additions & 10 deletions scripts/run_clippy.sh

This file was deleted.

36 changes: 9 additions & 27 deletions scripts/workflows/clippy.sh
Original file line number Diff line number Diff line change
@@ -1,28 +1,10 @@
#!/bin/sh

WORKSPACES="benches common protocols roles utils"

for workspace in $WORKSPACES; do
echo "Executing clippy on: $workspace"
cargo +1.75.0 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 +1.75 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
#!/bin/bash
for manifest in \
benches/Cargo.toml \
common/Cargo.toml \
protocols/Cargo.toml \
roles/Cargo.toml \
utils/Cargo.toml \
utils/message-generator/Cargo.toml; do
cargo clippy --manifest-path=$manifest -- -D warnings -A dead-code
done

echo "Clippy success, all tests passed!"

0 comments on commit e62691c

Please sign in to comment.