Bug 86417
| Summary: | check-webkit-style complains about anonymous blocks in C code | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Andy Estes <aestes> |
| Component: | Tools / Tests | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | eric |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | All | ||
| OS: | All | ||
Andy Estes
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
The patch in <https://bugs.webkit.org/show_bug.cgi?id=86411> has an example of such a block.
David Levin
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