diff options
author | fanquake <fanquake@gmail.com> | 2019-09-20 16:55:19 +0800 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2019-09-20 17:07:38 +0800 |
commit | 04321494aea6e18027d156d4bc8aff02d3347028 (patch) | |
tree | 28d2cafea847ec3776a1e231421bcb5afd878631 | |
parent | a73775e4d5902fe7a90116f45de71ddda3e2bacd (diff) | |
parent | 72a18a73af26ea551d39397787a2d178c8bbde7b (diff) |
Merge #16921: tests: Add information on how to add Vulture suppressions
72a18a73af26ea551d39397787a2d178c8bbde7b tests: Add information on how to add Vulture suppressions (practicalswift)
Pull request description:
Add information on how to add `vulture` suppressions.
As requested by MarcoFalke in https://github.com/bitcoin/bitcoin/issues/16906#issuecomment-533264107 -- your wish is my command! :)
ACKs for top commit:
fanquake:
ACK 72a18a73af26ea551d39397787a2d178c8bbde7b - similar sort of message as in [lint-spelling.sh](https://github.com/bitcoin/bitcoin/blob/master/test/lint/lint-spelling.sh).
Tree-SHA512: b347f8cea33d4b0ba987a972979b0ac3423938084fea923a2c457a8081bc839a94ad818689d147477104b9197dc35be413f76a96026cd1507b4411d7513e3464
-rwxr-xr-x | test/lint/lint-python-dead-code.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/lint/lint-python-dead-code.sh b/test/lint/lint-python-dead-code.sh index 77bf5990a7..af37d393e8 100755 --- a/test/lint/lint-python-dead-code.sh +++ b/test/lint/lint-python-dead-code.sh @@ -13,7 +13,11 @@ if ! command -v vulture > /dev/null; then exit 0 fi -vulture \ +VULTURE_SUPPRESSIONS=$(dirname "${BASH_SOURCE[0]}")/lint-python-dead-code-whitelist +if ! vulture \ --min-confidence 60 \ $(git rev-parse --show-toplevel) \ - $(dirname "${BASH_SOURCE[0]}")/lint-python-dead-code-whitelist + "${VULTURE_SUPPRESSIONS}"; then + echo "False positives? Suppressions can be added to ${VULTURE_SUPPRESSIONS}" + exit 1 +fi |