Files
zulip/tools/travis/static-analysis
Tim Abbott 9e503f2dcf run-mypy: Check scripts by default.
Previously, we checked scripts in a separate run to work around mypy
not supporting multiple scripts with the same name.  Since we have
fixed that issue, we can restore the original behavior.

We leave the --scripts-only option available, though I'm not sure it's
particularly useful and we'll probably eventually remove it.
2016-10-15 22:53:29 -07:00

21 lines
594 B
Bash
Executable File

#!/bin/bash
retcode=0
set -x
./tools/run-mypy --py2 --linecoverage-report || retcode=1
./tools/run-mypy --py3 || retcode=1
set +x
if [ "$retcode" == "0" ]; then
echo "The mypy static type checker for python detected no errors!"
else
echo
echo "The mypy static type checker for Python threw some errors,"
echo "which indicates a bug in your code or incorrect type annotations."
echo "Please see http://zulip.readthedocs.io/en/latest/mypy.html for details"
echo "on mypy, how Zulip is using mypy, and how to debug common issues."
exit "$retcode"
fi
tools/check-py3