electron/script/pylint.py

24 lines
531 B
Python
Raw Normal View History

2013-09-27 02:21:49 +00:00
#!/usr/bin/env python
import glob
import os
import subprocess
import sys
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
2013-09-27 02:21:49 +00:00
def main():
os.chdir(SOURCE_ROOT)
pylint = os.path.join(SOURCE_ROOT, 'vendor', 'depot_tools', 'pylint.py')
settings = ['--rcfile=vendor/depot_tools/pylintrc']
2013-09-27 02:43:10 +00:00
pys = glob.glob('script/*.py')
2016-11-18 20:50:53 +00:00
env = os.environ.copy()
env['PYTHONPATH'] = 'script'
subprocess.check_call([sys.executable, pylint] + settings + pys, env=env)
2013-09-27 02:21:49 +00:00
if __name__ == '__main__':
sys.exit(main())