diff options
author | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-12 00:48:27 +0000 |
---|---|---|
committer | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-12 00:48:27 +0000 |
commit | 55463aa638379da4f65c92e46b581f9581756306 (patch) | |
tree | 7cefb2680232c7fb62bd6607418826db59639ea3 /PRESUBMIT.py | |
parent | d070582a805e605390539181fdb811137a188a2d (diff) | |
download | chromium_src-55463aa638379da4f65c92e46b581f9581756306.zip chromium_src-55463aa638379da4f65c92e46b581f9581756306.tar.gz chromium_src-55463aa638379da4f65c92e46b581f9581756306.tar.bz2 |
Downgrade the wstring check from an error to a warning.
BUG=None
TEST=manual
Review URL: http://codereview.chromium.org/8229016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104970 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'PRESUBMIT.py')
-rw-r--r-- | PRESUBMIT.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/PRESUBMIT.py b/PRESUBMIT.py index 8b62bd1..a475097 100644 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py @@ -112,7 +112,7 @@ def _CheckNoIOStreamInHeaders(input_api, output_api): def _CheckNoNewWStrings(input_api, output_api): """Checks to make sure we don't introduce use of wstrings.""" - errors = [] + problems = [] for f in input_api.AffectedFiles(): for line_num, line in f.ChangedContents(): if (not f.LocalPath().endswith(('.cc', '.h')) or @@ -120,12 +120,13 @@ def _CheckNoNewWStrings(input_api, output_api): continue if 'wstring' in line: - errors.append(output_api.PresubmitError( - '%s, line %d: new code should not use wstrings. If you are ' - 'calling an API that accepts a wstring, fix the API.' - % (f.LocalPath(), line_num))) + problems.append(' %s:%d' % (f.LocalPath(), line_num)) - return errors + if not problems: + return [] + return [output_api.PresubmitPromptWarning('New code should not use wstrings.' + ' If you are calling an API that accepts a wstring, fix the API.\n' + + '\n'.join(problems))] def _CommonChecks(input_api, output_api): |