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

Unified Diff: presubmit_canned_checks.py

Issue 13866044: Add cpplint to presubmit input_api (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: bump version 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 | presubmit_support.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: presubmit_canned_checks.py
diff --git a/presubmit_canned_checks.py b/presubmit_canned_checks.py
index 62471fc8323eea6a5bcebb63545a39e21223c824..209d65434b2f1a9c4a6df8d4180131e209796898 100644
--- a/presubmit_canned_checks.py
+++ b/presubmit_canned_checks.py
@@ -95,8 +95,7 @@ def CheckChangeLintsClean(input_api, output_api, source_file_filter=None):
_RE_IS_TEST = input_api.re.compile(r'.*tests?.(cc|h)$')
result = []
- # Initialize cpplint.
- import cpplint
+ cpplint = input_api.cpplint
# Access to a protected member _XX of a client class
# pylint: disable=W0212
cpplint._cpplint_state.ResetErrorCounts()
@@ -114,14 +113,6 @@ def CheckChangeLintsClean(input_api, output_api, source_file_filter=None):
'-readability/casting,-runtime/int,-runtime/virtual,'
'-whitespace/braces')
- # 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 in ('<hash_map>', '<hash_set>') else (a, b, header)
- for (a, b, header) in cpplint._re_pattern_templates
- ]
-
# We currently are more strict with normal code than unit tests; 4 and 5 are
# the verbosity level that would normally be passed to cpplint.py through
# --verbose=#. Hopefully, in the future, we can be more verbose.
« no previous file with comments | « no previous file | presubmit_support.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698