From 68386a89800c6fa98138df25ba624a10f99288c4 Mon Sep 17 00:00:00 2001 From: Marc Fehling Date: Fri, 6 Sep 2024 09:01:34 +0200 Subject: [PATCH] Use run-clang-tidy instead of run-clang-tidy.py. --- contrib/utilities/run_clang_tidy.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/contrib/utilities/run_clang_tidy.sh b/contrib/utilities/run_clang_tidy.sh index 29b289f270..cdae209007 100755 --- a/contrib/utilities/run_clang_tidy.sh +++ b/contrib/utilities/run_clang_tidy.sh @@ -25,8 +25,7 @@ # make sure to run this script in an empty build directory # # Requirements: -# Clang 5.0.1+ and have clang, clang++, and run-clang-tidy.py in -# your path. +# Clang 5.0.1+ and have clang, clang++, and run-clang-tidy in your path. # grab first argument and make relative path an absolute one: SRC=$1 @@ -41,14 +40,14 @@ fi echo "SRC-DIR=$SRC" # enable MPI (to get MPI warnings) -# export compile commands (so that run-clang-tidy.py works) +# export compile commands (so that run-clang-tidy works) ARGS=("-D" "DEAL_II_WITH_MPI=ON" "-D" "CMAKE_EXPORT_COMPILE_COMMANDS=ON" "-D" "CMAKE_BUILD_TYPE=Debug" "$@") # for a list of checks, see /.clang-tidy cat "$SRC/.clang-tidy" -if ! [ -x "$(command -v run-clang-tidy.py)" ] || ! [ -x "$(command -v clang++)" ]; then - echo "make sure clang, clang++, and run-clang-tidy.py (part of clang) are in the path" +if ! [ -x "$(command -v run-clang-tidy)" ] || ! [ -x "$(command -v clang++)" ]; then + echo "make sure clang, clang++, and run-clang-tidy (part of clang) are in the path" exit 2 fi @@ -63,7 +62,7 @@ cmake --build . --target expand_all_instantiations || (echo "make expand_all_ins # # pipe away stderr (just contains nonsensical "x warnings generated") # pipe output to output.txt -run-clang-tidy.py -p . -quiet -header-filter "$SRC/include/*" -extra-arg='-DCLANG_TIDY' 2>error.txt >output.txt +run-clang-tidy -p . -quiet -header-filter "$SRC/include/*" -extra-arg='-DCLANG_TIDY' 2>error.txt >output.txt # grep interesting errors and make sure we remove duplicates: grep -E '(warning|error): ' output.txt | sort | uniq >clang-tidy.log -- 2.39.5