Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2078)

Unified Diff: cc/PRESUBMIT.py

Issue 13949005: Add cpplint for webkit/compositor_bindings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webkit/compositor_bindings/PRESUBMIT.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/PRESUBMIT.py
diff --git a/cc/PRESUBMIT.py b/cc/PRESUBMIT.py
index f49515fc2b658802c7a1048a0a402800b8118994..e82e9abb0dd5008ab0d15786eb90e077e6035b8a 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(
« no previous file with comments | « no previous file | webkit/compositor_bindings/PRESUBMIT.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698