memgraph/tools/arc-clang-tidy
Matej Ferencevic cde2875a50 Fix linter script
Reviewers: teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1988
2019-04-25 17:21:23 +02:00

14 lines
329 B
Bash
Executable File

#!/bin/bash
## Run this script through arc lint
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