Fix linter script
Reviewers: teon.banek Reviewed By: teon.banek Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D1988
This commit is contained in:
parent
13309a0323
commit
cde2875a50
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user