Clang tidy quality of life (#2348)

This commit is contained in:
Rot127 2024-05-08 14:24:01 +00:00 committed by GitHub
parent 9378216492
commit 0002f10c99
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,10 +1,16 @@
#!/bin/sh -x
#!/bin/sh
if [ $# -ne 1 ] || [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
echo "$0 <build-path>"
echo "Set env var 'base_sha' to upstream/next hash and 'head_sha' and your current HEAD hash."
exit 1
fi
if [ -z $base_sha ] || [ -z $head_sha ]; then
echo "Set env var 'base_sha' to upstream/next hash and 'head_sha' and your current HEAD hash."
exit 0
fi
BUILD_PATH="$1"
clang-tidy $(find ./arch ./*.c -type f -iregex ".*\.[c]") -p "$BUILD_PATH" -checks=clang-analyzer-*,-clang-analyzer-cplusplus* > ct-warnings.txt
@ -46,6 +52,8 @@ if [ -z $needs_fixes ]; then
exit 0
fi
cat ct-warnings.txt
echo -e "\n\nclang-tidy warnings for: $faulty_files\n"
echo "Please fix them. Or, if completely unrelated, let us know."