summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.clang-tidy1
-rw-r--r--Makefile10
2 files changed, 9 insertions, 2 deletions
diff --git a/.clang-tidy b/.clang-tidy
index 7d7f4ca..406a7e0 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -101,3 +101,2 @@ Checks: >
# readability-simplify-boolean-expr,
-WarningsAsErrors: '*'
HeaderFilterRegex: '(Swift|Swiften|Sluift)/.*'
diff --git a/Makefile b/Makefile
index d72f311..b26f8a3 100644
--- a/Makefile
+++ b/Makefile
@@ -1 +1,4 @@
+
+NUM_CPU := $(shell python -c 'import multiprocessing; print(multiprocessing.cpu_count())')
+
.PHONY: all
@@ -6,3 +9,8 @@ all: build.ninja
clang-tidy: compile_commands.json
- ninja -t targets all | grep cxx | grep -v 3rdParty | sed -e's/\.o: cxx/.cpp/' | xargs -n 1 clang-tidy
+ ninja -t targets all | grep cxx | grep -v 3rdParty | sed -e's/\.o: cxx/.cpp/' | xargs -t -P ${NUM_CPU} -n 1 clang-tidy -warnings-as-errors=*
+
+.PHONY: clang-tidy-fix
+clang-tidy-fix: compile_commands.json
+ ninja -t targets all | grep cxx | grep -v 3rdParty | sed -e's/\.o: cxx/.cpp/' | xargs -t -P ${NUM_CPU} -n 1 -I{} clang-tidy -p=${PWD} -export-fixes={}.clang-tidy-changes.yaml {}
+ clang-apply-replacements -remove-change-desc-files ${PWD}