test: Add crc32c exception to various linters and generation scripts

(cherry picked from commit bitcoin/bitcoin@3a037d0067)

Zcash:
- Excludes linters and scripts we don't have.
- Re-adds leveldb to lint-includes.sh because of a false positive.
This commit is contained in:
Wladimir J. van der Laan 2019-11-07 13:56:31 +01:00 committed by Jack Grigg
parent 6dcb678f3f
commit 49deefbc9d
3 changed files with 4 additions and 3 deletions

View File

@ -12,7 +12,7 @@ HEADER_ID_PREFIX="ZCASH_"
HEADER_ID_PREFIX_UPSTREAM="BITCOIN_"
HEADER_ID_SUFFIX="_H"
REGEXP_EXCLUDE_FILES_WITH_PREFIX="src/(crypto/ctaes/|leveldb/|secp256k1/|tinyformat.h|univalue/)"
REGEXP_EXCLUDE_FILES_WITH_PREFIX="src/(crypto/ctaes/|leveldb/|crc32c/|secp256k1/|tinyformat.h|univalue/)"
EXIT_CODE=0
for HEADER_FILE in $(git ls-files -- "*.h" | grep -vE "^${REGEXP_EXCLUDE_FILES_WITH_PREFIX}")

View File

@ -9,12 +9,13 @@
# Guard against accidental introduction of new Boost dependencies.
export LC_ALL=C
IGNORE_REGEXP="/(leveldb|crc32c)/"
# 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}"'$'
git ls-files | grep -E "^src/.*\.${1}"'$' | grep -Ev "${IGNORE_REGEXP}"
}
EXIT_CODE=0

View File

@ -10,7 +10,7 @@
export LC_ALL=C
EXIT_CODE=0
OUTPUT=$(git grep " open(" -- "*.py" | grep -vE "encoding=.(ascii|utf8|utf-8)." | grep -vE "open\([^,]*, ['\"][^'\"]*b[^'\"]*['\"]")
OUTPUT=$(git grep " open(" -- "*.py" ":(exclude)src/crc32c/" | grep -vE "encoding=.(ascii|utf8|utf-8)." | grep -vE "open\([^,]*, ['\"][^'\"]*b[^'\"]*['\"]")
if [[ ${OUTPUT} != "" ]]; then
echo "Python's open(...) seems to be used to open text files without explicitly"
echo "specifying encoding=\"utf8\":"