mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
dc14874d3e
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
24 lines
726 B
Bash
Executable File
24 lines
726 B
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# Copyright (c) 2018 The Bitcoin Core developers
|
|
# Distributed under the MIT software license, see the accompanying
|
|
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
#
|
|
# Find dead Python code.
|
|
|
|
export LC_ALL=C
|
|
|
|
if ! command -v vulture > /dev/null; then
|
|
echo "Skipping Python dead code linting since vulture is not installed. Install by running \"pip3 install vulture\""
|
|
exit 0
|
|
fi
|
|
|
|
VULTURE_SUPPRESSIONS=$(dirname "${BASH_SOURCE[0]}")/lint-python-dead-code-whitelist
|
|
if ! vulture \
|
|
--min-confidence 60 \
|
|
$(git rev-parse --show-toplevel) \
|
|
"${VULTURE_SUPPRESSIONS}"; then
|
|
echo "False positives? Suppressions can be added to ${VULTURE_SUPPRESSIONS}"
|
|
exit 1
|
|
fi
|