WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
86417
check-webkit-style complains about anonymous blocks in C code
https://bugs.webkit.org/show_bug.cgi?id=86417
Summary
check-webkit-style complains about anonymous blocks in C code
Andy Estes
Reported
2012-05-14 17:27:21 PDT
When using an anonymous block in C code, such as: dispatch_async(queue, ^{ // anonymous block }); check-webkit-style complains: "Missing space before { [whitespace/braces] [5]" As far as I know our style guide doesn't cover blocks specifically, but this is a common style and should probably be allowed.
Attachments
Add attachment
proposed patch, testcase, etc.
Andy Estes
Comment 1
2012-05-14 17:28:09 PDT
The patch in <
https://bugs.webkit.org/show_bug.cgi?id=86411
> has an example of such a block.
David Levin
Comment 2
2012-05-14 17:30:58 PDT
Should be too hard to fix the regex if it bothers you:
http://code.google.com/searchframe#OAMlx_jo-ck/src/third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/cpp.py&exact_package=chromium&q=%22Missing%20space%20before%20%7B%22&l=1911
and add a corresponding test here:
http://code.google.com/searchframe#OAMlx_jo-ck/src/third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py&exact_package=chromium&q=%22Missing%20space%20before%20%7B%22&l=1633
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