Add wrapper script for pylint.
This commit is contained in:
parent
ef8a05be38
commit
2b923b988c
1 changed files with 22 additions and 0 deletions
22
script/pylint.py
Executable file
22
script/pylint.py
Executable file
|
@ -0,0 +1,22 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import glob
|
||||||
|
import os
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
|
||||||
|
SOURCE_ROOT = os.path.dirname(os.path.dirname(__file__))
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
os.chdir(SOURCE_ROOT)
|
||||||
|
|
||||||
|
pylint = os.path.join(SOURCE_ROOT, 'vendor', 'depot_tools', 'pylint.py')
|
||||||
|
settings = ['--rcfile=vendor/depot_tools/pylintrc']
|
||||||
|
pys = glob.glob('script/*.py') + [os.path.join('script', 'lib')]
|
||||||
|
subprocess.check_call([sys.executable, pylint] + settings + pys,
|
||||||
|
env=dict(PYTHONPATH='script'))
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
sys.exit(main())
|
Loading…
Reference in a new issue