Chromium Code Reviews| Index: ui/PRESUBMIT.py |
| diff --git a/ui/PRESUBMIT.py b/ui/PRESUBMIT.py |
| index 4ee1ec87e3a7a8e181fea6606c602131c63c68ef..e69858bfc2c623b4fdaefc622d78c947e3a45087 100644 |
| --- a/ui/PRESUBMIT.py |
| +++ b/ui/PRESUBMIT.py |
| @@ -36,10 +36,10 @@ def CheckUniquePtr(input_api, output_api, |
| # TODO(sky): this incorrectly catches templates. Fix and reenable. |
|
sky
2016/09/06 18:19:17
Nuke.
Adam Rice
2016/09/07 02:44:09
Done.
|
| # Disallow: |
| # std::unique_ptr<T>() |
|
sky
2016/09/06 18:19:17
Update
Adam Rice
2016/09/07 02:44:09
I don't know how to update this. It looks correct
|
| - # if input_api.re.search(r'\bstd::unique_ptr<.*?>\(\)', line): |
| - # errors.append(output_api.PresubmitError( |
| - # '%s:%d uses std::unique_ptr<T>(). Use nullptr instead.' % |
| - # (f.LocalPath(), line_number))) |
| + if input_api.re.search(r'\bstd::unique_ptr<[^<>]+>\(\)', line): |
| + errors.append(output_api.PresubmitError( |
| + '%s:%d uses std::unique_ptr<T>(). Use nullptr instead.' % |
| + (f.LocalPath(), line_number))) |
| return errors |