From 0f59fdb79e53592a3451824cd2cf02ef71dc8663 Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Tue, 13 Oct 2020 20:48:24 +0100 Subject: [PATCH] don't run clang-tidy on header files --- format.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/format.sh b/format.sh index 4e464c9780..16adddc764 100755 --- a/format.sh +++ b/format.sh @@ -33,4 +33,7 @@ astyle ${FILES} \ find ${FILES} -exec sed -i -e '$a\' {} \; # lint -clang-tidy -p . ${FILES} -- ${COMPILER_OPTS} +C_FILES=$(echo "$FILES" | grep '\.c$') +if [[ ! -z $C_FILES ]]; then + clang-tidy -p . ${C_FILES} -- ${COMPILER_OPTS} +fi