forked from oremanj/tricycle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
check.sh
executable file
·39 lines (29 loc) · 983 Bytes
/
check.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
set -ex
EXIT_STATUS=0
# Autoformatter *first*, to avoid double-reporting errors
black --check setup.py tricycle \
|| EXIT_STATUS=$?
# Run flake8 without pycodestyle and import-related errors
flake8 tricycle/ \
--ignore=D,E,W,F401,F403,F405,F821,F822\
|| EXIT_STATUS=$?
# Run mypy
mypy --strict --implicit-reexport -p tricycle || EXIT_STATUS=$?
# Finally, leave a really clear warning of any issues and exit
if [ $EXIT_STATUS -ne 0 ]; then
cat <<EOF
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Problems were found by static analysis (listed above).
To fix formatting and see remaining errors, run
pip install -r test-requirements.txt
black setup.py tricycle
./check.sh
in your local checkout.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
EOF
exit 1
fi
exit 0