rm clangtidy_checks.txt and it's usage since it's not needed, thanks to .clang-tidy file

This commit is contained in:
Loïc Bartoletti 2023-12-13 08:59:03 +01:00 committed by Julien Cabieces
parent 4786e59555
commit 5b4449602b
3 changed files with 2 additions and 10 deletions

View File

@ -35,12 +35,11 @@ curl -XGET https://raw.githubusercontent.com/llvm/llvm-project/llvmorg-14.0.6/cl
echo "::endgroup::"
echo "${bold}Run clang-tidy on modifications...${endbold}"
CLANG_TIDY_CHECKS=$(cat tests/code_layout/clangtidy_checks.txt | grep -ve "^#" | grep -ve "^$" | tr -d '\n')
# We need to add build/src/test dir as extra include directories because when clang-tidy tries to process qgstest.h
# it has no compile_commands.json instructions to know what are include directories
# It manages to figure out for other headers though, I don't get how...
git diff -U0 HEAD^ | python3 clang-tidy-diff.py -p1 -path=${CTEST_BUILD_DIR} -use-color -checks="$CLANG_TIDY_CHECKS" -extra-arg=-I${CTEST_BUILD_DIR}/src/test/ | tee clang-tidy.log
git diff -U0 HEAD^ | python3 clang-tidy-diff.py -p1 -path=${CTEST_BUILD_DIR} -use-color -extra-arg=-I${CTEST_BUILD_DIR}/src/test/ | tee clang-tidy.log
echo -e "\e[1;34mTo reproduce locally:"
echo -e "\e[1;34m - launch cmake with option -DCMAKE_EXPORT_COMPILE_COMMANDS=ON"

View File

@ -52,8 +52,6 @@ while getopts "p:am:" o; do
done
shift $((OPTIND-1))
CLANG_TIDY_CHECKS=$(cat ${SOURCE_DIR}/tests/code_layout/clangtidy_checks.txt | grep -ve "^#" | grep -ve "^$" | tr -d '\n')
if [[ ! -f "$BUILD_DIR/compile_commands.json" ]]; then
echo "compile_commands.json file is missing, you need to add -DCMAKE_EXPORT_COMPILE_COMMANDS=ON when you run cmake to generate it."
exit 1
@ -80,5 +78,5 @@ set +e
for file in $FILES;
do
clang-tidy -p=$BUILD_DIR -checks="$CLANG_TIDY_CHECKS" $file
clang-tidy -p=$BUILD_DIR $file
done

View File

@ -1,5 +0,0 @@
bugprone-*,
# Those we don't want to fix
-bugprone-easily-swappable-parameters,
-bugprone-virtual-near-miss