Fix linter script

Reviewers: teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1988
This commit is contained in:
Matej Ferencevic 2019-04-25 16:36:58 +02:00
parent 13309a0323
commit cde2875a50

View File

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