aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2021-04-28 03:00:43 -0700
committerWireshark GitLab Utility <gerald+gitlab-utility@wireshark.org>2021-04-28 10:02:02 +0000
commit0d12050e5e7970a7ea1ddf9d645d6bf8e263df8d (patch)
tree2f6b4f48f884e23c1d6fd0b65a9e895e94a31060
parentebafa3a4b9d6b3755eca44e69227e995a4cb3416 (diff)
validate-clang-check: fix some issues.
Not all shells support [[ ]] compound commands; it's not in the most recent Single UNIX Specification I could see, and the ubuntu-clang-other-tests job is reporting tools/validate-clang-check.sh: 18: [[: not found Don't use [[ ]]. In addition, if you change extcap/etl.c, it tries to run clang-check on it, but that file builds, and is only built, on Windows, so clang-check fails dismally on UN*Xes. Omit it for now.
-rwxr-xr-xtools/validate-clang-check.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/validate-clang-check.sh b/tools/validate-clang-check.sh
index 933d8f50e1..53401ba9f4 100755
--- a/tools/validate-clang-check.sh
+++ b/tools/validate-clang-check.sh
@@ -14,8 +14,17 @@ COMMIT_FILES=$( git diff-index --cached --name-status HEAD^ | grep -v "^D" | cut
for FILE in $COMMIT_FILES; do
# Skip some special cases
+ FILE_BASENAME="$(basename file)"
# iLBC: the file is not even compiled when ilbc is not installed
- [[ $FILE =~ /iLBC/ ]] && continue
+ if test "$FILE_BASENAME" = "iLBCdecode.c"
+ then
+ continue
+ fi
+ # extcap/etl.c: that compiles, and is compiled, only on Windows
+ if test "$FILE_BASENAME" = "etl.c"
+ then
+ continue
+ fi
clang-check ../$FILE
clang-check -analyze ../$FILE