Skip to content
Snippets Groups Projects
Commit d901504e authored by Cheng Zhao's avatar Cheng Zhao Committed by GitHub
Browse files

Merge pull request #10804 from robinwassen/optional-cpplint

cpplint skip to run if dependencies has not been bootstrapped
parents 4dc74776 60e614b1
No related merge requests found
......@@ -38,6 +38,10 @@ SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
def main():
if not os.path.isfile(cpplint_path()):
print("[INFO] Skipping cpplint, dependencies has not been bootstrapped")
return
os.chdir(SOURCE_ROOT)
atom_files = list_files('atom',
['app', 'browser', 'common', 'renderer', 'utility'],
......@@ -60,9 +64,13 @@ def list_files(parent, directories, filters):
def call_cpplint(files):
cpplint = os.path.join(SOURCE_ROOT, 'vendor', 'depot_tools', 'cpplint.py')
cpplint = cpplint_path()
execute([sys.executable, cpplint] + files)
def cpplint_path():
return os.path.join(SOURCE_ROOT, 'vendor', 'depot_tools', 'cpplint.py')
if __name__ == '__main__':
sys.exit(main())
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment