walk all files in atom/ and brightray/
This commit is contained in:
parent
cab1b81026
commit
30f8660a20
1 changed files with 4 additions and 7 deletions
11
script/cpplint.py
vendored
11
script/cpplint.py
vendored
|
@ -71,20 +71,17 @@ def main():
|
||||||
enable_verbose_mode()
|
enable_verbose_mode()
|
||||||
|
|
||||||
os.chdir(SOURCE_ROOT)
|
os.chdir(SOURCE_ROOT)
|
||||||
files = find_files('atom',
|
files = find_files(['atom', 'brightray'], is_cpp_file)
|
||||||
['app', 'browser', 'common', 'renderer', 'utility'],
|
|
||||||
is_cpp_file)
|
|
||||||
files |= find_files('brightray', ['browser', 'common'], is_cpp_file)
|
|
||||||
files -= set(IGNORE_FILES)
|
files -= set(IGNORE_FILES)
|
||||||
if args.only_changed:
|
if args.only_changed:
|
||||||
files &= find_changed_files()
|
files &= find_changed_files()
|
||||||
call_cpplint(list(files))
|
call_cpplint(list(files))
|
||||||
|
|
||||||
|
|
||||||
def find_files(root, directories, test):
|
def find_files(roots, test):
|
||||||
matches = set()
|
matches = set()
|
||||||
for directory in directories:
|
for root in roots:
|
||||||
for parent, _, children, in os.walk(os.path.join(root, directory)):
|
for parent, _, children, in os.walk(root):
|
||||||
for child in children:
|
for child in children:
|
||||||
filename = os.path.join(parent,child)
|
filename = os.path.join(parent,child)
|
||||||
if test(filename):
|
if test(filename):
|
||||||
|
|
Loading…
Reference in a new issue