diff options
author | MarcoFalke <falke.marco@gmail.com> | 2019-09-05 02:00:39 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2019-09-05 02:00:44 +0200 |
commit | 761fe07ba9b56bae3e6757fef6e41e79f147a767 (patch) | |
tree | 5ee29be0ce7976230122acf56577ff9bb2e847b1 | |
parent | 8e00a68552404160583f7fb340e53f7b8128a550 (diff) | |
parent | 490da639cbd48ce0dc438abbfc89ab796391cb2a (diff) |
Merge #16768: test: Make lint-includes.sh work from any directory
490da639cbd48ce0dc438abbfc89ab796391cb2a Make lint-includes.sh work from any directory (Kristaps Kaupe)
Pull request description:
Before this change it works from root folder of bitcoin git repo, but if you do `cd test/lint; ./test-includes.sh`, you will have a lot of false positive messages like this:
```
Good job! The circular dependency "chainparamsbase -> util/system -> chainparamsbase" is no longer present.
Please remove it from EXPECTED_CIRCULAR_DEPENDENCIES in ./lint-circular-dependencies.sh
to make sure this circular dependency is not accidentally reintroduced.
Good job! The circular dependency "index/txindex -> validation -> index/txindex" is no longer present.
Please remove it from EXPECTED_CIRCULAR_DEPENDENCIES in ./lint-circular-dependencies.sh
to make sure this circular dependency is not accidentally reintroduced.
```
Top commit has no ACKs.
Tree-SHA512: 07fa69cb2883181dcee922191acac4b242722eeb2916cdffdc7163421302b22f3c9525aaf4c754a9dba1c307032c05285e38191d5c6aabc894321f8a27bbceaa
-rwxr-xr-x | test/lint/lint-includes.sh | 3 |
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}" } |