blob: 2d66ba53588627d64549ec62f4303f36a740ec2f [file] [log] [blame]
afazekas4d1bee82013-03-25 17:36:04 +01001#!/usr/bin/env bash
2
Sean Dague2416cf32013-04-10 08:29:07 -04003flake8 --ignore=E122,E125,E126,H302,H304,H404,F --show-source --exclude=.git,.venv,.tox,dist,doc,openstack,*egg .
afazekas4d1bee82013-03-25 17:36:04 +01004pep8_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