aboutsummaryrefslogtreecommitdiff
path: root/test/lint/lint-includes.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/lint/lint-includes.sh')
-rwxr-xr-xtest/lint/lint-includes.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/lint/lint-includes.sh b/test/lint/lint-includes.sh
index 4b9e2615b6..d27e45a23f 100755
--- a/test/lint/lint-includes.sh
+++ b/test/lint/lint-includes.sh
@@ -11,6 +11,9 @@
export LC_ALL=C
IGNORE_REGEXP="/(leveldb|secp256k1|univalue)/"
+# cd to root folder of git repo for git ls-files to work properly
+cd "$(dirname $0)/../.." || exit 1
+
filter_suffix() {
git ls-files | grep -E "^src/.*\.${1}"'$' | grep -Ev "${IGNORE_REGEXP}"
}