Bug 27497

Summary: Feature request: cpplint should check for braces - rule 2
Product: WebKit Reporter: Luciano Wolf <luciano.wolf>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Minor CC: kenneth, manyoso
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   
Attachments:
Description Flags
Add support for making sure { is on the same line as foreach manyoso: review+

Luciano Wolf
Reported 2009-07-21 07:26:45 PDT
According to Braces rule 2 of the Webkit coding style guidelines[1]: "Other braces: place the open brace on the line preceding the code block; place the close brace on its own line." cpplint doesn't complain about non-compliance with this rule when using the Qt foreach macro, as illustrated below WRONG CODING STYLE: foreach (AbstractMetaFunction *func, lst) { qDebug() << "*" << func->ownerClass()->name() << "Private: " << func->isPrivate() << "Empty: " << func->isEmptyFunction(); } [1] http://webkit.org/coding/coding-style.html
Attachments
Add support for making sure { is on the same line as foreach (3.10 KB, patch)
2009-07-21 12:31 PDT, Kenneth Rohde Christiansen
manyoso: review+
Kenneth Rohde Christiansen
Comment 1 2009-07-21 12:31:22 PDT
Created attachment 33199 [details] Add support for making sure { is on the same line as foreach
Kenneth Rohde Christiansen
Comment 2 2009-07-21 12:43:57 PDT
Landed in r46188
Note You need to log in before you can comment on or make changes to this bug.