WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
177897
check-webkit-style erroneously requires a space between the caret and brace in obj-c blocks.
https://bugs.webkit.org/show_bug.cgi?id=177897
Summary
check-webkit-style erroneously requires a space between the caret and brace i...
Megan Gardner
Reported
2017-10-04 14:00:01 PDT
Check webkit style throws an error when you do not put a space between the ^ and the { for objective-c blocks. It was made so with the changes for this bug:
https://bugs.webkit.org/show_bug.cgi?id=161247
But there is agreement that this should not be the case, and a space should not be required. A vast majority of the code in webkit already conforms to this style, with only a few outliers.
Attachments
Patch
(1.51 KB, patch)
2017-10-04 14:57 PDT
,
Megan Gardner
no flags
Details
Formatted Diff
Diff
Patch
(2.84 KB, patch)
2017-10-04 15:22 PDT
,
Megan Gardner
no flags
Details
Formatted Diff
Diff
Patch
(3.42 KB, patch)
2017-10-04 16:38 PDT
,
Megan Gardner
dbates
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Megan Gardner
Comment 1
2017-10-04 14:57:52 PDT
Created
attachment 322730
[details]
Patch
Megan Gardner
Comment 2
2017-10-04 15:15:16 PDT
I need to expand this, new patch forthcoming
Megan Gardner
Comment 3
2017-10-04 15:22:09 PDT
Created
attachment 322732
[details]
Patch
Jonathan Bedard
Comment 4
2017-10-04 15:41:22 PDT
If you look at
comment 5
in <
https://bugs.webkit.org/show_bug.cgi?id=161247
>, I specifically call out the problem Megan is addressing here... I'm not an Objective C programmer, and the WebKit style guide gives some conflicting advice on this. This seems like the right change, especially since you've seemed agreement with others more familiar than I with Objective C style.
Megan Gardner
Comment 5
2017-10-04 16:38:34 PDT
Created
attachment 322739
[details]
Patch
Jonathan Bedard
Comment 6
2017-10-04 16:43:03 PDT
Comment on
attachment 322739
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=322739&action=review
Unofficial R+, but please edit the ChangeLog to reflect the new behavior
> Tools/ChangeLog:8 > + Remove the check for a space between ^ and {,
To clarify, this change does the opposite of the original code, right? Now the style checker will enforce that there is NOT a space between ^ and { in an objective-C block.
Daniel Bates
Comment 7
2017-10-04 23:52:31 PDT
Comment on
attachment 322739
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=322739&action=review
> Tools/ChangeLog:3 > + check-webkit-style erroneously requires a space between the carrot and brace in obj-c blocks.
Blocks are not specific to Objective-C.
https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithBlocks/WorkingwithBlocks.html
> Tools/Scripts/webkitpy/style/checkers/cpp.py:1265 > + if search(r'\^\s\{', group):
Would it make sense to check for one or more space characters, \s+? If so, please add additional tests.
Megan Gardner
Comment 8
2017-10-05 15:41:42 PDT
https://trac.webkit.org/r222937
Radar WebKit Bug Importer
Comment 9
2017-10-05 15:42:48 PDT
<
rdar://problem/34845080
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug