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()
|
||||
|
||||
os.chdir(SOURCE_ROOT)
|
||||
files = find_files('atom',
|
||||
['app', 'browser', 'common', 'renderer', 'utility'],
|
||||
is_cpp_file)
|
||||
files |= find_files('brightray', ['browser', 'common'], is_cpp_file)
|
||||
files = find_files(['atom', 'brightray'], is_cpp_file)
|
||||
files -= set(IGNORE_FILES)
|
||||
if args.only_changed:
|
||||
files &= find_changed_files()
|
||||
call_cpplint(list(files))
|
||||
|
||||
|
||||
def find_files(root, directories, test):
|
||||
def find_files(roots, test):
|
||||
matches = set()
|
||||
for directory in directories:
|
||||
for parent, _, children, in os.walk(os.path.join(root, directory)):
|
||||
for root in roots:
|
||||
for parent, _, children, in os.walk(root):
|
||||
for child in children:
|
||||
filename = os.path.join(parent,child)
|
||||
if test(filename):
|
||||
|
|
Loading…
Reference in a new issue