aboutsummaryrefslogtreecommitdiff
path: root/clang-format.sh
diff options
context:
space:
mode:
Diffstat (limited to 'clang-format.sh')
-rw-r--r--clang-format.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/clang-format.sh b/clang-format.sh
new file mode 100644
index 0000000..3b45543
--- /dev/null
+++ b/clang-format.sh
@@ -0,0 +1,13 @@
+#/usr/bin/env bash
+
+echo "\n\nFormatting openvic-extension with clang-format:\n"
+find ./extension/src/ -iname *.hpp -o -iname *.cpp | xargs clang-format --verbose -i
+
+if [ -d ./extension/deps/openvic-simulation ]; then
+ cd ./extension/deps/openvic-simulation
+ if [ -f ./clang-format.sh ]; then
+ ./clang-format.sh
+ fi
+fi
+
+exit 0