Skip to content

Commit 10f83c3

Browse files
committed
tools: Use git ls-files instead of find
Signed-off-by: Philipp Jungkamp <[email protected]>
1 parent f67eb09 commit 10f83c3

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tools/format-all.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,5 @@
66
# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University
77
# SPDX-License-Identifier: Apache-2.0
88

9-
TOP_DIR=$(git rev-parse --show-toplevel)
10-
11-
find ${TOP_DIR} \( -iname "*.cpp" -o -iname "*.hpp" -o -iname "*.h" -o -iname "*.c" \) -a \
12-
-not \( -path "${TOP_DIR}/fpga/thirdparty/*" -o -path "${TOP_DIR}/build*/*" \) | \
13-
xargs clang-format --verbose -i
9+
git ls-files -c -z -- "*.c" ".h" "*.hpp" "*.cpp" ":!:fpga/thirdparty" |\
10+
xargs -0 clang-format --verbose -i

0 commit comments

Comments
 (0)