#! /bin/bash
function perform_lint() {
echo "Performing LINT..."
- if hash clang-format-3.9 2>/dev/null; then
- CLANG_FORMAT=clang-format-3.9
- else
+ if [ -z "${CLANG_FORMAT}" ]; then
CLANG_FORMAT=clang-format
fi
echo "LINT: Using binary $CLANG_FORMAT"
whitelisted=$(awk '$1 == "'$f'" { print 1 }' "$CLANG_FORMAT_WHITELIST")
# If file is not whitelisted, mark a failure
- if [ -z ${whitelisted} ]; then
+ if [ -z "${whitelisted}" ]; then
errorcount=$((errorcount+1))
printf "The file %s is not compliant with the coding style" "$f"