mirror of
https://github.com/capstone-engine/capstone.git
synced 2025-02-18 13:30:16 +00:00
Clang tidy quality of life (#2348)
This commit is contained in:
parent
9378216492
commit
0002f10c99
@ -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."
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user