-
Notifications
You must be signed in to change notification settings - Fork 808
Expand file tree
/
Copy pathformat-do.sh
More file actions
executable file
·37 lines (30 loc) · 907 Bytes
/
format-do.sh
File metadata and controls
executable file
·37 lines (30 loc) · 907 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env bash
# Format C++ and CMake files
# Usage: ./format-do.sh
#
# This script formats all C++ and CMake files in the project.
# Run ./format-check.sh to verify formatting without making changes.
#
# Required tools:
# - clang-format version 17
# - cmake-format version 0.6.13
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
if [[ "$1" == "--help" || "$1" == "-h" ]]; then
echo "Usage: ./format-do.sh"
echo ""
echo "Format all C++ and CMake files in the project."
echo "Run ./format-check.sh to verify formatting without making changes."
echo ""
echo "Required tools:"
echo " - clang-format version 17"
echo " - cmake-format version 0.6.13"
exit 0
fi
echo "Formatting C++ files..."
"$SCRIPT_DIR/ci/clang-format-do.sh"
echo ""
echo "Formatting CMake files..."
"$SCRIPT_DIR/ci/cmake-format-do.sh"
echo ""
echo "Formatting complete."