mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 04:52:59 +01:00
714beebe07
2bff472992
[contrib] convert test-security-check to python3 (John Newbery)958bf40489
add lint tool to check python3 shebang (practicalswift) Pull request description: base58.py can executed by python3 Tree-SHA512: 30511204feefd4ccd5b4bf698fb88e516633e692dc95d31fe957b1c0c4879de25906355b28a5a0522171887315c8464a611e601ff00540db172d5bd463ee13d9
12 lines
409 B
Bash
Executable File
12 lines
409 B
Bash
Executable File
#!/bin/bash
|
|
# Shebang must use python3 (not python or python2)
|
|
EXIT_CODE=0
|
|
for PYTHON_FILE in $(git ls-files -- "*.py"); do
|
|
if [[ $(head -c 2 "${PYTHON_FILE}") == "#!" &&
|
|
$(head -n 1 "${PYTHON_FILE}") != "#!/usr/bin/env python3" ]]; then
|
|
echo "Missing shebang \"#!/usr/bin/env python3\" in ${PYTHON_FILE} (do not use python or python2)"
|
|
EXIT_CODE=1
|
|
fi
|
|
done
|
|
exit ${EXIT_CODE}
|