From 500ffdf70031b03b40c95091698df27e104c6d08 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 10 May 2017 13:51:57 -0700 Subject: [PATCH] cpplint brightray/ files --- brightray/CPPLINT.cfg | 1 + script/cpplint.py | 24 +++++++++++++++++++----- 2 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 brightray/CPPLINT.cfg diff --git a/brightray/CPPLINT.cfg b/brightray/CPPLINT.cfg new file mode 100644 index 000000000000..01e99482f2b0 --- /dev/null +++ b/brightray/CPPLINT.cfg @@ -0,0 +1 @@ +filter=-build/header_guard,-build/include_what_you_use,-legal/copyright,-runtime/references diff --git a/script/cpplint.py b/script/cpplint.py index 6c715522f8ce..0c91dc06aea8 100755 --- a/script/cpplint.py +++ b/script/cpplint.py @@ -17,6 +17,15 @@ IGNORE_FILES = [ os.path.join('atom', 'common', 'api', 'api_messages.h'), os.path.join('atom', 'common', 'common_message_generator.cc'), os.path.join('atom', 'common', 'common_message_generator.h'), + os.path.join('brightray', 'browser', 'mac', + 'bry_inspectable_web_contents_view.h'), + os.path.join('brightray', 'browser', 'mac', 'event_dispatching_window.h'), + os.path.join('brightray', 'browser', 'mac', + 'notification_center_delegate.h'), + os.path.join('brightray', 'browser', 'win', 'win32_desktop_notifications', + 'desktop_notification_controller.cc'), + os.path.join('brightray', 'browser', 'win', 'win32_desktop_notifications', + 'desktop_notification_controller.h') ] SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) @@ -24,15 +33,20 @@ SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) def main(): os.chdir(SOURCE_ROOT) - files = list_files(['app', 'browser', 'common', 'renderer', 'utility'], - ['*.cc', '*.h']) - call_cpplint(list(set(files) - set(IGNORE_FILES))) + atom_files = list_files('atom', + ['app', 'browser', 'common', 'renderer', 'utility'], + ['*.cc', '*.h']) + call_cpplint(list(set(atom_files) - set(IGNORE_FILES))) + + brightray_files = list_files('brightray', ['browser', 'common'], + ['*.cc', '*.h']) + call_cpplint(list(set(brightray_files) - set(IGNORE_FILES))) -def list_files(directories, filters): +def list_files(parent, directories, filters): matches = [] for directory in directories: - for root, _, filenames, in os.walk(os.path.join('atom', directory)): + for root, _, filenames, in os.walk(os.path.join(parent, directory)): for f in filters: for filename in fnmatch.filter(filenames, f): matches.append(os.path.join(root, filename))