mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-22 00:06:12 -05:00
rm clangtidy_checks.txt and it's usage since it's not needed, thanks to .clang-tidy file
This commit is contained in:
parent
4786e59555
commit
5b4449602b
@ -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"
|
||||
|
@ -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
|
||||
|
@ -1,5 +0,0 @@
|
||||
bugprone-*,
|
||||
|
||||
# Those we don't want to fix
|
||||
-bugprone-easily-swappable-parameters,
|
||||
-bugprone-virtual-near-miss
|
Loading…
x
Reference in New Issue
Block a user