aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-06-28 17:42:18 +0200
committerHampusM <hampus@hampusmat.com>2022-06-28 17:42:18 +0200
commit1e60d3ab02dbe7c609237c087575fe0801edf8eb (patch)
treef9f1c446f14d7ca5c9eb481f27c16caa4ff36492 /scripts
parent02cd1707f2c22fb6cd42bbb1ebfe1a0cd28ac3ff (diff)
refactor: improve includes
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/lint-includes.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/lint-includes.sh b/scripts/lint-includes.sh
new file mode 100755
index 0000000..4248a80
--- /dev/null
+++ b/scripts/lint-includes.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+# See https://github.com/include-what-you-use/include-what-you-use
+
+iwyu_tool.py \
+ --jobs 16 \
+ -p build \
+ src \
+ include \
+ -- \
+ -Xiwyu --cxx17ns \
+ -Xiwyu --check_also='*.hpp' \
+| fix_includes.py \
+ --blank_lines \
+ --reorder \
+ --nocomments
+
+# -Xiwyu --mapping_file=$PWD/mappings.imp \
+