Skip to content

Commit d43aeb5

Browse files
committed
Makefile: format all C/C++ files
Switch to exclude-list instead of an explicit list of C/C++ files to format. We episodically forget to add new files. With exclude-list it's impossible to forget.
1 parent 45ab0e9 commit d43aeb5

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Makefile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -272,12 +272,13 @@ format_keep_sorted:
272272
find . -name "*.yml" -exec bin/keep-sorted {} \;
273273

274274
format_cpp:
275-
clang-format --style=file -i executor/*.cc executor/*.h \
276-
executor/android/android_seccomp.h \
277-
tools/kcovtrace/*.c tools/kcovfuzzer/*.c tools/fops_probe/*.cc \
278-
tools/clang/*.h \
279-
tools/clang/declextract/*.h tools/clang/declextract/*.cpp \
280-
tools/clang/codesearch/*.h tools/clang/codesearch/*.cpp
275+
# Exclude auto-generated and canned files.
276+
git ls-files *.h *.c *.cc *.cpp | grep -Ev \
277+
"executor/_include/flatbuffers/\
278+
|pkg/flatrpc/flatrpc.h\
279+
|pkg/covermerger/testdata/integration/\
280+
|executor/android/.*_policy.h" \
281+
| xargs -I {} -P 0 clang-format --style=file -i {}
281282

282283
format_sys: bin/syz-fmt
283284
bin/syz-fmt all

0 commit comments

Comments
 (0)