mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 21:12:48 +01:00
da33c9619c
* Update to leveldb upstream using subtree merge * Import crc32c using subtree merge as as 'src/crc32c' * build: Update build system for new leveldb Upstream leveldb switched build systems, which means we need to define a few different values. Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com> * doc: Add crc32c subtree to developer notes * test: Add crc32c to subtree check linter * test: Add crc32c exception to various linters and generation scripts * build: Add LCOV exception for crc32c Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com> * build: CRC32C build system integration Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
29 lines
1.1 KiB
Bash
Executable File
29 lines
1.1 KiB
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.
|
|
#
|
|
# Make sure we explicitly open all text files using UTF-8 (or ASCII) encoding to
|
|
# avoid potential issues on the BSDs where the locale is not always set.
|
|
|
|
export LC_ALL=C
|
|
EXIT_CODE=0
|
|
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\":"
|
|
echo
|
|
echo "${OUTPUT}"
|
|
EXIT_CODE=1
|
|
fi
|
|
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\":"
|
|
echo
|
|
echo "${OUTPUT}"
|
|
EXIT_CODE=1
|
|
fi
|
|
exit ${EXIT_CODE}
|