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

Issue 6755007: Relax |const NSClass*| PRESUBMIT check to not detect false positives (Closed)

Created:
9 years, 8 months ago by Mark Mentovai
Modified:
9 years, 7 months ago
Reviewers:
bradnelson, Nico
CC:
chromium-reviews, M-A Ruel
Visibility:
Public.

Description

Relax |const NSClass*| PRESUBMIT check to not detect false positives when encountering Foundation types that are not id-derived, including NSPoint, NSRange, NSRect, and NSSize. BUG=77438 TEST=Modify chrome/browser/renderer_host/render_widget_host_view_mac.mm Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=79564

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -2 lines) Patch
M presubmit_canned_checks.py View 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Mark Mentovai
This was http://codereview.chromium.org/6745017/ but the location of the checks moved over the weekend.
9 years, 8 months ago (2011-03-28 16:34:30 UTC) #1
Nico
Lgtm (Didn't you send something like this last week?) On Mar 28, 2011 6:34 PM, ...
9 years, 8 months ago (2011-03-28 16:36:44 UTC) #2
Mark Mentovai
9 years, 8 months ago (2011-03-28 16:40:38 UTC) #3
Yeah, see the note I sent when I mailed the change out. This moved to
a new file in a way that was a bit of a pain to reuse the old
codereview issue, so I just made a new one.

Mark

On Mon, Mar 28, 2011 at 12:36 PM, Nico Weber <thakis@chromium.org> wrote:
> Lgtm
>
> (Didn't you send something like this last week?)
>
> On Mar 28, 2011 6:34 PM, <mark@chromium.org> wrote:
>> Reviewers: Nico, bradnelson,
>>
>> Message:
>> This was http://codereview.chromium.org/6745017/ but the location of the
>> checks
>> moved over the weekend.
>>
>> Description:
>> Relax |const NSClass*| PRESUBMIT check to not detect false positives when
>> encountering Foundation types that are not id-derived, including NSPoint,
>> NSRange, NSRect, and NSSize.
>>
>> BUG=77438
>> TEST=Modify chrome/browser/renderer_host/render_widget_host_view_mac.mm
>>
>> Please review this at http://codereview.chromium.org/6755007/
>>
>> SVN Base: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
>>
>> Affected files:
>> M presubmit_canned_checks.py
>>
>>
>> Index: presubmit_canned_checks.py
>> ===================================================================
>> --- presubmit_canned_checks.py (revision 79561)
>> +++ presubmit_canned_checks.py (working copy)
>> @@ -724,11 +724,12 @@
>>
>> def _CheckConstNSObject(input_api, output_api, source_file_filter):
>> """Checks to make sure no objective-c files have |const NSSomeClass*|."""
>> - pattern = input_api.re.compile(r'const\s+NS\w*\s*\*')
>> + pattern = input_api.re.compile(
>> + r'const\s+NS(?!(Point|Range|Rect|Size)\s*\*)\w*\s*\*')
>>
>> def objective_c_filter(f):
>> return (source_file_filter(f) and
>> - input_api.os_path.splitext(f.LocalPath())[1] in ('.h', '.mm'))
>> + input_api.os_path.splitext(f.LocalPath())[1] in
>> ('.h', '.m', '.mm'))
>>
>> files = []
>> for f in input_api.AffectedSourceFiles(objective_c_filter):
>>
>>
>

Powered by Google App Engine
This is Rietveld 408576698