aboutsummaryrefslogtreecommitdiff
path: root/test/lint
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2020-06-05 08:50:34 +0300
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2020-06-05 16:15:31 +0300
commit7dda912e1c28b02723c9f24fa6c4e9003d928978 (patch)
treee134936eaa7bbcd15bd8d13cd7e641427073eb7d /test/lint
parent4ede05d421e7799e631bb83ed16799e8bae79eeb (diff)
downloadbitcoin-7dda912e1c28b02723c9f24fa6c4e9003d928978.tar.xz
test: Do not swallow flake8 exit code
Diffstat (limited to 'test/lint')
-rwxr-xr-xtest/lint/lint-python.sh14
1 files changed, 11 insertions, 3 deletions
diff --git a/test/lint/lint-python.sh b/test/lint/lint-python.sh
index b9aa6c799b..decea38c4f 100755
--- a/test/lint/lint-python.sh
+++ b/test/lint/lint-python.sh
@@ -90,12 +90,20 @@ elif PYTHONWARNINGS="ignore" flake8 --version | grep -q "Python 2"; then
exit 0
fi
-PYTHONWARNINGS="ignore" flake8 --ignore=B,C,E,F,I,N,W --select=$(IFS=","; echo "${enabled[*]}") $(
+EXIT_CODE=0
+
+if ! PYTHONWARNINGS="ignore" flake8 --ignore=B,C,E,F,I,N,W --select=$(IFS=","; echo "${enabled[*]}") $(
if [[ $# == 0 ]]; then
git ls-files "*.py"
else
echo "$@"
fi
-)
+); then
+ EXIT_CODE=1
+fi
+
+if ! mypy --ignore-missing-imports $(git ls-files "test/functional/*.py"); then
+ EXIT_CODE=1
+fi
-mypy --ignore-missing-imports $(git ls-files "test/functional/*.py") \ No newline at end of file
+exit $EXIT_CODE