From 30f8660a20870822a6d748ffbd81393ecc12983a Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Tue, 19 Dec 2017 15:57:03 -0600 Subject: [PATCH] walk all files in atom/ and brightray/ --- script/cpplint.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/script/cpplint.py b/script/cpplint.py index c0eae971cb64..9dd25276aeef 100755 --- a/script/cpplint.py +++ b/script/cpplint.py @@ -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):