summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKacper <kacper@mail.openlinux.dev>2025-12-09 19:44:46 +0100
committerKacper <kacper@mail.openlinux.dev>2025-12-09 19:46:37 +0100
commit119aed5bc787ccbf23d2f151759ec1f3a80977e1 (patch)
treed0202bf19c339b586dcb2612fd7e579faf07de12
parent885f5974cdf65b59415837ae97f5a14ef1350670 (diff)
chore(makefile): add include-what-you-use (iwyu) to makefile
-rw-r--r--makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/makefile b/makefile
index a79c1218..9feeb30f 100644
--- a/makefile
+++ b/makefile
@@ -130,6 +130,14 @@ PHONY += defconfig
defconfig:
$(Q)$(MAKE) -f scripts/kconfig/makefile defconfig
+include-what-you-use: compile_commands.json
+ $(Q)iwyu_tool.py -p. -j$(nproc) -- \
+ --update_comments | \
+ fix_includes.py --comments \
+ --quoted_includes_first \
+ --update_comments \
+ --reorder
+
clang-tidy: compile_commands.json
$(Q)clang-tidy -header-filter=.* -p=. $(shell find . -name '*.c' -o -name '*.h' | grep -v './scripts/\|dtoa\|linux\|arch\|bits')