Add -DCLANG_TIDY when running clang tidy.
diff --git a/scripts/run_clang_tidy_format.sh b/scripts/run_clang_tidy_format.sh index 238333a..94bf81d 100755 --- a/scripts/run_clang_tidy_format.sh +++ b/scripts/run_clang_tidy_format.sh
@@ -43,7 +43,7 @@ rm -f tidy-*.fail # sh syntax is -c "string" [name [args ...]], so "tidy" here is the name and not included in "$@" -echo ${HEADERS} ${SOURCES} | xargs -P${PARALLEL_JOBS} -n1 sh -c "${CLANG_TIDY} -export-fixes=\$(mktemp -p. tidy.fail-XXXX) \$@" tidy +echo ${HEADERS} ${SOURCES} | xargs -P${PARALLEL_JOBS} -n1 sh -c "${CLANG_TIDY} --extra-arg=-DCLANG_TIDY -export-fixes=\$(mktemp -p. tidy.fail-XXXX) \$@" tidy if [ $(find . -maxdepth 1 -name 'tidy.fail-*' -size +0 | wc -l) -gt 0 ] ; then # clang-tidy put non-empty output in one of the tidy-*.fail files cat tidy.fail-*