From a62208fda5da3235a876d653ea7d01ccfc8ae48d Mon Sep 17 00:00:00 2001 From: "tfarina@chromium.org" Date: Wed, 25 Feb 2015 03:23:11 +0000 Subject: [PATCH] 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 --- presubmit_canned_checks.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/presubmit_canned_checks.py b/presubmit_canned_checks.py index 1e2d1ab62e..087188df5e 100644 --- a/presubmit_canned_checks.py +++ b/presubmit_canned_checks.py @@ -112,7 +112,7 @@ def CheckDoNotSubmitInFiles(input_api, output_api): 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 @@ def CheckChangeLintsClean(input_api, output_api, source_file_filter=None, 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: