summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/clang-tools.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/clang-tools.sh b/scripts/clang-tools.sh
index 23d5b289ef..f26b065263 100755
--- a/scripts/clang-tools.sh
+++ b/scripts/clang-tools.sh
@@ -20,10 +20,10 @@ cd $1
function check_tidy() {
echo "Running clang-tidy on $0..."
- if [ -n $1 ] && [ $1 == "--fix" ]; then
- OUTPUT=$(${CLANG_TIDY} -p=$PWD -fix -fix-errors $0 2>/dev/null)
+ if [[ -n $1 ]] && [[ $1 == "--fix" ]]; then
+ OUTPUT=$(${CLANG_TIDY} -p=$PWD -fix -fix-errors ${0} 2>/dev/null)
else
- OUTPUT=$(${CLANG_TIDY} -p=$PWD $0 2>/dev/null)
+ OUTPUT=$(${CLANG_TIDY} -p=$PWD ${0} 2>/dev/null)
fi
if [[ -n $OUTPUT ]]; then
echo "Caught clang-tidy warning/error:"