blob: 01724fa3f0b892744e99ffce3aa27992ef6592f4 [file] [log] [blame]
afazekas4d1bee82013-03-25 17:36:04 +01001#!/usr/bin/env bash
2
Sean Dague14c68182013-04-14 15:34:30 -04003flake8 --ignore=E125,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