afazekas | 4d1bee8 | 2013-03-25 17:36:04 +0100 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | |
Sean Dague | 14c6818 | 2013-04-14 15:34:30 -0400 | [diff] [blame] | 3 | flake8 --ignore=E125,H302,H304,H404,F --show-source --exclude=.git,.venv,.tox,dist,doc,openstack,*egg . |
afazekas | 4d1bee8 | 2013-03-25 17:36:04 +0100 | [diff] [blame] | 4 | pep8_ret=$? |
| 5 | |
| 6 | pyflakes tempest stress setup.py tools cli bin | grep "imported but unused" |
| 7 | unused_ret=$? |
| 8 | |
| 9 | ret=0 |
| 10 | if [ $pep8_ret != 0 ]; then |
| 11 | echo "hacking.py/pep8 test FAILED!" >&2 |
| 12 | (( ret += 1 )) |
| 13 | else |
| 14 | echo "hacking.py/pep8 test OK!" >&2 |
| 15 | fi |
| 16 | |
| 17 | if [ $unused_ret == 0 ]; then |
| 18 | echo "Unused import test FAILED!" >&2 |
| 19 | (( ret += 2 )) |
| 20 | else |
| 21 | echo "Unused import test OK!" >&2 |
| 22 | fi |
| 23 | |
| 24 | exit $ret |