Commit a62208fd authored by tfarina@chromium.org's avatar tfarina@chromium.org

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
parent e0a7c5d4
...@@ -112,7 +112,7 @@ def CheckDoNotSubmitInFiles(input_api, output_api): ...@@ -112,7 +112,7 @@ def CheckDoNotSubmitInFiles(input_api, output_api):
def CheckChangeLintsClean(input_api, output_api, source_file_filter=None, 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.""" """Checks that all '.cc' and '.h' files pass cpplint.py."""
_RE_IS_TEST = input_api.re.compile(r'.*tests?.(cc|h)$') _RE_IS_TEST = input_api.re.compile(r'.*tests?.(cc|h)$')
result = [] result = []
...@@ -136,7 +136,8 @@ def CheckChangeLintsClean(input_api, output_api, source_file_filter=None, ...@@ -136,7 +136,8 @@ def CheckChangeLintsClean(input_api, output_api, source_file_filter=None,
else: else:
level = 4 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 cpplint._cpplint_state.error_count > 0:
if input_api.is_committing: if input_api.is_committing:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment