From b73f65fa20711bbc33c00a84d97172ecea00c376 Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Tue, 3 Jul 2018 15:19:25 +0000 Subject: [PATCH] Add bash script to run clang format on all files --- tools/clang-format-all.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 tools/clang-format-all.sh diff --git a/tools/clang-format-all.sh b/tools/clang-format-all.sh new file mode 100755 index 000000000..275d856d3 --- /dev/null +++ b/tools/clang-format-all.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +read -p "Are you sure you want to run clang-format on all files in src/? (y/n) " -n 1 -r +echo +if [[ $REPLY =~ ^[Yy]$ ]]; then + find src/ -iname "*.hpp" -o -iname "*.cpp" -exec clang-format -i {} \; +fi