Bug 182015

Summary: check-webkit-style reports false-positive whitespace/braces warning about blocks with return types as arguments in Objective-C
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: Tools / TestsAssignee: David Kilzer (:ddkilzer) <ddkilzer>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, darin, ews-watchlist, glenn, lforschler, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch v1
none
Archive of layout-test-results from ews206 for win-future none

Description David Kilzer (:ddkilzer) 2018-01-23 14:44:06 PST
This code which contains a block argument with a return type:

    [delegate setPolicyForURL:^_WKWebsitePolicy(NSURL *url) {
        return _WKWebsitePolicyDoIt;
    }];

Triggers a false-positive warning like this:

    Place brace on its own line for function definitions.  [whitespace/braces] [4]
Comment 1 David Kilzer (:ddkilzer) 2018-01-23 14:44:14 PST
<rdar://problem/36449728>
Comment 2 David Kilzer (:ddkilzer) 2018-01-23 14:55:25 PST
Created attachment 332081 [details]
Patch v1
Comment 3 EWS Watchlist 2018-01-23 19:02:21 PST
Comment on attachment 332081 [details]
Patch v1

Attachment 332081 [details] did not pass win-ews (win):
Output: http://webkit-queues.webkit.org/results/6189452

New failing tests:
http/tests/misc/bubble-drag-events.html
Comment 4 EWS Watchlist 2018-01-23 19:02:31 PST
Created attachment 332117 [details]
Archive of layout-test-results from ews206 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews206  Port: win-future  Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Comment 5 David Kilzer (:ddkilzer) 2018-01-24 09:59:30 PST
(In reply to Build Bot from comment #3)
> Comment on attachment 332081 [details]
> Patch v1
> 
> Attachment 332081 [details] did not pass win-ews (win):
> Output: http://webkit-queues.webkit.org/results/6189452
> 
> New failing tests:
> http/tests/misc/bubble-drag-events.html

FYI: There is no possible way this patch can cause a Windows layout test failure as it only changes Python code used by check-webkit-style.
Comment 6 WebKit Commit Bot 2018-01-24 10:11:18 PST
Comment on attachment 332081 [details]
Patch v1

Clearing flags on attachment: 332081

Committed r227532: <https://trac.webkit.org/changeset/227532>
Comment 7 WebKit Commit Bot 2018-01-24 10:11:20 PST
All reviewed patches have been landed.  Closing bug.