From d22357fca406b17c3f22e45ac10a990d59e6d558 Mon Sep 17 00:00:00 2001 From: Philipp Jungkamp Date: Wed, 4 Jun 2025 15:20:07 +0200 Subject: [PATCH] tools: Use git ls-files instead of find Signed-off-by: Philipp Jungkamp Signed-off-by: Steffen Vogel --- tools/format-all.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tools/format-all.sh b/tools/format-all.sh index f5d73eb93..0d90f377f 100755 --- a/tools/format-all.sh +++ b/tools/format-all.sh @@ -6,8 +6,5 @@ # 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" \) -a \ - -not \( -path "${TOP_DIR}/fpga/thirdparty/*" -o -path "${TOP_DIR}/build*/*" \) | \ - xargs clang-format --verbose -i +git ls-files -c -z -- "*.c" ".h" "*.hpp" "*.cpp" ":!:fpga/thirdparty" |\ + xargs -0 clang-format --verbose -i