]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - util/travis/lint.sh
Update our tooling (Clang 5 -> 7, GCC 7 -> 8)
[dragonfireclient.git] / util / travis / lint.sh
index cd5f41779a139aa50a073a1e1df0ae25560eb93e..b3027c689efca3d66e9235d4a6a061a4e15cbdd9 100644 (file)
@@ -1,9 +1,7 @@
 #! /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"
@@ -20,7 +18,7 @@ function perform_lint() {
                        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"