Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(247)

Issue 919253002: ui: Add another presubmit check to catch two more scoped_ptr usages. (Closed)

Created:
5 years, 10 months ago by tfarina
Modified:
5 years, 10 months ago
CC:
chromium-reviews, danakj, tapted
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

ui: Add another presubmit check to catch two more scoped_ptr usages. This should catch the following usages: 1- return scoped_ptr<T>(foo) 2- bar = scoped_ptr<T>(foo) And recommend the solo usage of make_scoped_ptr(). The entries were found with the following command line: $ git grep -E '(=|\breturn)\s*scoped_ptr<.*?>([^)]+)' BUG=None TEST=g cl presubmit -uv R=sky@chromium.org,maruel@chromium.org Committed: https://crrev.com/63f25bef305bd8143766e2e1a98bf01548c78376 Cr-Commit-Position: refs/heads/master@{#317669}

Patch Set 1 #

Patch Set 2 : import re #

Total comments: 3

Patch Set 3 : review #

Patch Set 4 : format it - pip install --upgrade pep8 - third_party/WebKit/Tools/Scripts/format-webkitpy --chromiu… #

Total comments: 2

Patch Set 5 : two spaces ;) #

Patch Set 6 : REBASE #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+15 lines, -3 lines) Patch
M ui/PRESUBMIT.py View 1 2 3 4 2 chunks +15 lines, -3 lines 1 comment Download

Messages

Total messages: 24 (8 generated)
tfarina
Marc-Antoine, could you review this? Scott, for OWNERS approval after Marc-Antoine is happy with this. ...
5 years, 10 months ago (2015-02-13 01:42:06 UTC) #1
Marc-Antoine Ruel (Google)
https://codereview.chromium.org/919253002/diff/20001/ui/PRESUBMIT.py File ui/PRESUBMIT.py (right): https://codereview.chromium.org/919253002/diff/20001/ui/PRESUBMIT.py#newcode11 ui/PRESUBMIT.py:11: import re not needed https://codereview.chromium.org/919253002/diff/20001/ui/PRESUBMIT.py#newcode32 ui/PRESUBMIT.py:32: if re.search(r'(=|\breturn)\s*scoped_ptr<.*?(?<!])>\([^)]+\)', line): ...
5 years, 10 months ago (2015-02-13 02:16:51 UTC) #3
tfarina
PTAL https://codereview.chromium.org/919253002/diff/20001/ui/PRESUBMIT.py File ui/PRESUBMIT.py (right): https://codereview.chromium.org/919253002/diff/20001/ui/PRESUBMIT.py#newcode32 ui/PRESUBMIT.py:32: if re.search(r'(=|\breturn)\s*scoped_ptr<.*?(?<!])>\([^)]+\)', line): On 2015/02/13 02:16:51, Marc-Antoine Ruel ...
5 years, 10 months ago (2015-02-13 02:28:40 UTC) #4
Marc-Antoine Ruel (Google)
lgtm, assuming there's no false positive https://codereview.chromium.org/919253002/diff/60001/ui/PRESUBMIT.py File ui/PRESUBMIT.py (right): https://codereview.chromium.org/919253002/diff/60001/ui/PRESUBMIT.py#newcode12 ui/PRESUBMIT.py:12: r'.*\.(cc|h|mm)$', I like ...
5 years, 10 months ago (2015-02-13 02:31:48 UTC) #5
tfarina
Done. https://codereview.chromium.org/919253002/diff/60001/ui/PRESUBMIT.py File ui/PRESUBMIT.py (right): https://codereview.chromium.org/919253002/diff/60001/ui/PRESUBMIT.py#newcode12 ui/PRESUBMIT.py:12: r'.*\.(cc|h|mm)$', On 2015/02/13 02:31:48, Marc-Antoine Ruel (Google) wrote: ...
5 years, 10 months ago (2015-02-13 02:37:05 UTC) #7
tfarina
Sadrul, could you approve this as well, now that dependent change was approved and landed ...
5 years, 10 months ago (2015-02-20 11:03:58 UTC) #9
sky
LGTM
5 years, 10 months ago (2015-02-23 15:50:05 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/919253002/80001
5 years, 10 months ago (2015-02-23 16:53:12 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator/builds/61689)
5 years, 10 months ago (2015-02-23 16:56:01 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/919253002/100001
5 years, 10 months ago (2015-02-23 21:37:28 UTC) #17
commit-bot: I haz the power
Committed patchset #6 (id:100001)
5 years, 10 months ago (2015-02-23 22:42:46 UTC) #18
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/63f25bef305bd8143766e2e1a98bf01548c78376 Cr-Commit-Position: refs/heads/master@{#317669}
5 years, 10 months ago (2015-02-23 22:43:47 UTC) #19
scottmg
https://codereview.chromium.org/919253002/diff/100001/ui/PRESUBMIT.py File ui/PRESUBMIT.py (right): https://codereview.chromium.org/919253002/diff/100001/ui/PRESUBMIT.py#newcode38 ui/PRESUBMIT.py:38: if re.search(r'\bscoped_ptr<.*?>\(\)', line): i think this should be input_api.re? ...
5 years, 10 months ago (2015-02-24 00:18:33 UTC) #21
scottmg
A revert of this CL (patchset #6 id:100001) has been created in https://codereview.chromium.org/954473003/ by scottmg@chromium.org. ...
5 years, 10 months ago (2015-02-24 00:19:09 UTC) #22
tfarina
I thinking this Scott On Mon, Feb 23, 2015 at 9:19 PM, <scottmg@chromium.org> wrote: > ...
5 years, 10 months ago (2015-02-24 00:23:17 UTC) #23
tfarina
5 years, 10 months ago (2015-02-24 00:23:26 UTC) #24
Message was sent while issue was closed.
On Mon, Feb 23, 2015 at 9:23 PM, Thiago Farina <tfarina@chromium.org> wrote:

> I thinking this Scott
>
> fixing

> On Mon, Feb 23, 2015 at 9:19 PM, <scottmg@chromium.org> wrote:
>
>> A revert of this CL (patchset #6 id:100001) has been created in
>> https://codereview.chromium.org/954473003/ by scottmg@chromium.org.
>>
>> The reason for reverting is: Presubmit in ui/ failing with
>>
>> ...
>> File "<string>", line 38, in CheckScopedPtr
>> NameError: global name 're' is not defined.
>>
>> https://codereview.chromium.org/919253002/
>>
>
>
>
> --
> Thiago Farina
>



-- 
Thiago Farina

To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698