afazekas | 4d1bee8 | 2013-03-25 17:36:04 +0100 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | |
| 3 | python tools/hacking.py --ignore=E122,E125,E126 --repeat --show-source --exclude=.venv,.tox,dist,doc,openstack,*egg . |
| 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 |