cpplint skip to run if dependencies has not been bootstrapped
See #10593 for the discussion regarding this
This commit is contained in:
parent
bce7d37086
commit
60e614b10c
1 changed files with 9 additions and 1 deletions
10
script/cpplint.py
vendored
10
script/cpplint.py
vendored
|
@ -38,6 +38,10 @@ SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
if not os.path.isfile(cpplint_path()):
|
||||||
|
print("[INFO] Skipping cpplint, dependencies has not been bootstrapped")
|
||||||
|
return
|
||||||
|
|
||||||
os.chdir(SOURCE_ROOT)
|
os.chdir(SOURCE_ROOT)
|
||||||
atom_files = list_files('atom',
|
atom_files = list_files('atom',
|
||||||
['app', 'browser', 'common', 'renderer', 'utility'],
|
['app', 'browser', 'common', 'renderer', 'utility'],
|
||||||
|
@ -60,9 +64,13 @@ def list_files(parent, directories, filters):
|
||||||
|
|
||||||
|
|
||||||
def call_cpplint(files):
|
def call_cpplint(files):
|
||||||
cpplint = os.path.join(SOURCE_ROOT, 'vendor', 'depot_tools', 'cpplint.py')
|
cpplint = cpplint_path()
|
||||||
execute([sys.executable, cpplint] + files)
|
execute([sys.executable, cpplint] + files)
|
||||||
|
|
||||||
|
|
||||||
|
def cpplint_path():
|
||||||
|
return os.path.join(SOURCE_ROOT, 'vendor', 'depot_tools', 'cpplint.py')
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
sys.exit(main())
|
sys.exit(main())
|
||||||
|
|
Loading…
Reference in a new issue