Skip to content

Commit 1365bee

Browse files
author
GueLaKais
committed
Fixup of the main rust_formatter.sh
1 parent 741c197 commit 1365bee

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

rust_formater.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
project_dirs=(
2+
"./rclrs"
3+
"./rosidl_runtime_rs"
4+
"./examples/message_demo"
5+
"./examples/minimal_client_service"
6+
"./examples/minimal_pub_sub"
7+
"./examples/your_package_name/"
8+
)
9+
10+
# Loop through each subdirectory
11+
for project_dir in "${project_dirs[@]}"; do
12+
# Check if the directory exists
13+
cd "$project_dir"
14+
15+
# Run cargo fmt
16+
cargo-fmt
17+
cargo-clippy
18+
19+
# Change back to the root directory
20+
cd "./"
21+
22+
done
23+
24+
echo "Formatting completed!"

0 commit comments

Comments
 (0)