diff --git a/tools/arc-clang-tidy b/tools/arc-clang-tidy index 7b7a1f6b8..3ef7620b8 100755 --- a/tools/arc-clang-tidy +++ b/tools/arc-clang-tidy @@ -1,9 +1,13 @@ -#!/bin/bash -e +#!/bin/bash ## Run this script through arc lint -if echo "$1" | egrep -q '.(cpp|hpp)$'; then - clang-tidy -quiet -p build "$1" -elif echo "$1" | egrep -q '.lcp$'; then - clang-tidy -quiet -p build "$1.cpp" "$(dirname $1)/$(basename $1 .lcp).hpp" +if echo "$1" | egrep -q '\.(cpp|hpp)$'; then + clang-tidy -quiet -p $( realpath build ) "$1" +elif echo "$1" | egrep -q '\.lcp$'; then + clang-tidy -quiet -p $( realpath build ) "$1.cpp" "$(dirname $1)/$(basename $1 .lcp).hpp" fi + +code=$? +[ $code -eq 1 ] && exit 0 +exit $code