From 46266e85de7f4b3decc0902fda369c3487c5e223 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 8 Sep 2023 09:03:13 +0000 Subject: [PATCH] Add script to format all files in repository Signed-off-by: Steffen Vogel --- tools/format-all.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tools/format-all.sh diff --git a/tools/format-all.sh b/tools/format-all.sh new file mode 100644 index 000000000..15e8f3531 --- /dev/null +++ b/tools/format-all.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +# +# Format all C++ files in repo +# +# Author: Steffen Vogel +# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University +# SPDX-License-Identifier: Apache-2.0 + +TOP_DIR=$(git rev-parse --show-toplevel) + +find ${TOP_DIR} -iname "*.cpp" -o -iname "*.hpp" -o -iname "*.h" -o -iname "*.c" | \ + xargs clang-format --verbose -i