Add run_checks.py
This commit is contained in:
parent
80feee323f
commit
7cd3c8724a
25
run_checks.py
Normal file
25
run_checks.py
Normal 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))
|
Loading…
Reference in New Issue
Block a user