Let clients pass the verbose level they want to cpplint.
This came in this CL review https://codereview.chromium.org/947983003/
BUG=None
R=dpranke@chromium.org
Review URL: https://codereview.chromium.org/955713003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294207 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/presubmit_canned_checks.py b/presubmit_canned_checks.py
index 1e2d1ab..087188d 100644
--- a/presubmit_canned_checks.py
+++ b/presubmit_canned_checks.py
@@ -112,7 +112,7 @@
def CheckChangeLintsClean(input_api, output_api, source_file_filter=None,
- lint_filters=None):
+ lint_filters=None, verbose_level=None):
"""Checks that all '.cc' and '.h' files pass cpplint.py."""
_RE_IS_TEST = input_api.re.compile(r'.*tests?.(cc|h)$')
result = []
@@ -136,7 +136,8 @@
else:
level = 4
- cpplint.ProcessFile(file_name, level)
+ verbose_level = verbose_level or level
+ cpplint.ProcessFile(file_name, verbose_level)
if cpplint._cpplint_state.error_count > 0:
if input_api.is_committing: