aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2026-01-19 08:43:31 +0100
committerDmitry Vyukov <dvyukov@google.com>2026-01-19 08:43:51 +0000
commitd43aeb52dbe1775688e98706ff905e35487cfe3b (patch)
tree4937f080b30c2e5374831a1c23e779ca9bea2822 /Makefile
parent45ab0e9513c6f93e72783f0801128eadf774178d (diff)
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.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 7 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 5cef2c92b..8495f6c5e 100644
--- a/Makefile
+++ b/Makefile
@@ -272,12 +272,13 @@ format_keep_sorted:
find . -name "*.yml" -exec bin/keep-sorted {} \;
format_cpp:
- clang-format --style=file -i executor/*.cc executor/*.h \
- executor/android/android_seccomp.h \
- tools/kcovtrace/*.c tools/kcovfuzzer/*.c tools/fops_probe/*.cc \
- tools/clang/*.h \
- tools/clang/declextract/*.h tools/clang/declextract/*.cpp \
- tools/clang/codesearch/*.h tools/clang/codesearch/*.cpp
+ # Exclude auto-generated and canned files.
+ git ls-files *.h *.c *.cc *.cpp | grep -Ev \
+"executor/_include/flatbuffers/\
+|pkg/flatrpc/flatrpc.h\
+|pkg/covermerger/testdata/integration/\
+|executor/android/.*_policy.h" \
+ | xargs -I {} -P 0 clang-format --style=file -i {}
format_sys: bin/syz-fmt
bin/syz-fmt all