mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-23 13:12:22 +02:00
test: Add crc32c exception to various linters and generation scripts
This commit is contained in:
@@ -9,7 +9,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\":"
|
||||
@@ -17,7 +17,7 @@ if [[ ${OUTPUT} != "" ]]; then
|
||||
echo "${OUTPUT}"
|
||||
EXIT_CODE=1
|
||||
fi
|
||||
OUTPUT=$(git grep "check_output(" -- "*.py" | grep "universal_newlines=True" | grep -vE "encoding=.(ascii|utf8|utf-8).")
|
||||
OUTPUT=$(git grep "check_output(" -- "*.py" ":(exclude)src/crc32c/"| grep "universal_newlines=True" | grep -vE "encoding=.(ascii|utf8|utf-8).")
|
||||
if [[ ${OUTPUT} != "" ]]; then
|
||||
echo "Python's check_output(...) seems to be used to get program outputs without explicitly"
|
||||
echo "specifying encoding=\"utf8\":"
|
||||
|
Reference in New Issue
Block a user