diff options
author | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-17 15:47:29 +0000 |
---|---|---|
committer | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-17 15:47:29 +0000 |
commit | 16f5cf095009d223d2e55b8682a01f99c41aec82 (patch) | |
tree | d7ad3df8256743cb1e94f2f0abe64435f5c60bf0 /cc/PRESUBMIT.py | |
parent | af4e286ebd6cc5fd1c3a2987da03875e1c0a53d8 (diff) | |
download | chromium_src-16f5cf095009d223d2e55b8682a01f99c41aec82.zip chromium_src-16f5cf095009d223d2e55b8682a01f99c41aec82.tar.gz chromium_src-16f5cf095009d223d2e55b8682a01f99c41aec82.tar.bz2 |
Add cpplint for webkit/compositor_bindings
Clean up the only presubmit error in the compositor bindings and
turn on cpplint warnings to prevent any future regressions.
Also, clean up cc's presubmit to match now that depot_tools has cpplint
in its input_api.
R=danakj@chromium.org
BUG=none
Review URL: https://codereview.chromium.org/13949005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194598 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/PRESUBMIT.py')
-rw-r--r-- | cc/PRESUBMIT.py | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/cc/PRESUBMIT.py b/cc/PRESUBMIT.py index f49515f..e82e9ab 100644 --- a/cc/PRESUBMIT.py +++ b/cc/PRESUBMIT.py @@ -14,26 +14,17 @@ CC_SOURCE_FILES=(r'^cc/.*\.(cc|h)$',) CC_PERF_TEST =(r'^.*_perftest.*\.(cc|h)$',) def CheckChangeLintsClean(input_api, output_api): - import cpplint - cpplint._cpplint_state.ResetErrorCounts() # reset global state + input_api.cpplint._cpplint_state.ResetErrorCounts() # reset global state source_filter = lambda x: input_api.FilterSourceFile( x, white_list=CC_SOURCE_FILES, black_list=None) files = [f.AbsoluteLocalPath() for f in input_api.AffectedSourceFiles(source_filter)] level = 1 # strict, but just warn - # Replace <hash_map> and <hash_set> as headers that need to be included - # with "base/hash_tables.h" instead. - cpplint._re_pattern_templates = [ - (a,b,'base/hash_tables.h') if (header == '<hash_map>' or - header == '<hash_set>') - else (a,b,header) - for (a,b,header) in cpplint._re_pattern_templates] - for file_name in files: - cpplint.ProcessFile(file_name, level) + input_api.cpplint.ProcessFile(file_name, level) - if not cpplint._cpplint_state.error_count: + if not input_api.cpplint._cpplint_state.error_count: return [] return [output_api.PresubmitPromptWarning( |