blob: 089ad70f4ccbd699ca99a866f3aabdf210bb1a3e [file] [log] [blame]
afazekas4d1bee82013-03-25 17:36:04 +01001#!/usr/bin/env bash
2
3python tools/hacking.py --ignore=E122,E125,E126 --repeat --show-source --exclude=.venv,.tox,dist,doc,openstack,*egg .
4pep8_ret=$?
5
6pyflakes tempest stress setup.py tools cli bin | grep "imported but unused"
7unused_ret=$?
8
9ret=0
10if [ $pep8_ret != 0 ]; then
11 echo "hacking.py/pep8 test FAILED!" >&2
12 (( ret += 1 ))
13else
14 echo "hacking.py/pep8 test OK!" >&2
15fi
16
17if [ $unused_ret == 0 ]; then
18 echo "Unused import test FAILED!" >&2
19 (( ret += 2 ))
20else
21 echo "Unused import test OK!" >&2
22fi
23
24exit $ret