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
This commit is contained in:
fanquake 2019-09-20 16:55:19 +08:00 committed by UdjinM6
parent 7aefec8de0
commit dc14874d3e
No known key found for this signature in database
GPG Key ID: 83592BD1400D58D9

View File

@ -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