File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /bin/bash
22
3+ check_for_failure () {
4+ " $@ " || failure=1
5+ }
6+
37location=" $( cd " $( dirname " ${0} " ) " ; pwd -P) "
48root=" $( cd " $( dirname " ${location} /../.." ) " ; pwd -P) "
59
610echo " Check format"
7- " ${root} " /scripts/check-format.sh
11+ check_for_failure " ${root} " /scripts/check-format.sh
812echo " -------------------------------------------------------------------------"
913
1014echo " Check docstring style"
11- pydocstyle
15+ check_for_failure pydocstyle
1216echo " -------------------------------------------------------------------------"
1317
1418echo " Check typing with mypy"
15- python3 -m mypy --config-file mypy.ini pedpy/
19+ check_for_failure python3 -m mypy --config-file mypy.ini pedpy/
1620echo " -------------------------------------------------------------------------"
1721
1822echo " Linting with pylint"
19- python3 -m pylint --recursive=y --extension-pkg-whitelist=scipy pedpy pedpy/data pedpy/io pedpy/methods pedpy/plotting pedpy/internal
23+ check_for_failure python3 -m pylint --recursive=y --extension-pkg-whitelist=scipy pedpy pedpy/data pedpy/io pedpy/methods pedpy/plotting pedpy/internal
24+ echo " -------------------------------------------------------------------------"
2025
26+ if (( failure)) ; then
27+ echo " Automated tests failed" >&2
28+ exit 1
29+ else
30+ echo " Automated tests succeeded" >&2
31+ exit 0
32+ fi
You can’t perform that action at this time.
0 commit comments