Chromium Code Reviews| Index: PRESUBMIT.py |
| diff --git a/PRESUBMIT.py b/PRESUBMIT.py |
| index 4195f5ab79781febb69d040698cb80a20499d960..43e7d522b324b1d17efc370f66e285b4622cb76f 100644 |
| --- a/PRESUBMIT.py |
| +++ b/PRESUBMIT.py |
| @@ -292,14 +292,21 @@ def _CheckNoNewWStrings(input_api, output_api): |
| f.LocalPath().endswith('test.cc')): |
| continue |
| + supressed = False |
|
Wez
2012/08/03 21:26:15
typo: suppressed
I'd suggest calling this allowWS
alexeypa (please no reviews)
2012/08/03 22:00:18
Done.
|
| for line_num, line in f.ChangedContents(): |
| - if 'wstring' in line: |
| + if 'presubmit: allow wstring' in line: |
| + supressed = True |
| + elif not supressed and 'wstring' in line: |
| problems.append(' %s:%d' % (f.LocalPath(), line_num)) |
| + supressed = False |
| + else: |
| + supressed = False |
| 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' + |
| + ' If you are calling a cross-platform API that accepts a wstring, ' |
| + 'fix the API.\n' + |
| '\n'.join(problems))] |