Add run_checks.py

This commit is contained in:
Florian Bruhin 2014-01-28 18:01:03 +01:00
parent 80feee323f
commit 7cd3c8724a

25
run_checks.py Normal file
View File

@ -0,0 +1,25 @@
import sys
from pkg_resources import load_entry_point
status = {}
def run(name, args=None):
sys.argv = [name, 'qutebrowser']
if args is not None:
sys.argv += args
print("====== {} ======".format(name))
try:
load_entry_point(name, 'console_scripts', name)()
except SystemExit as e:
status[name] = e
except Exception as e:
print(e)
status[name] = None
print()
run('pylint')
run('flake8', ['--max-complexity', '10'])
print('Exit status values:')
for (k, v) in status.items():
print(' {} - {}'.format(k, v))