WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 27496
Feature request: cpplint should check for indentation - rule 6
https://bugs.webkit.org/show_bug.cgi?id=27496
Summary
Feature request: cpplint should check for indentation - rule 6
Luciano Wolf
Reported
2009-07-21 07:11:52 PDT
According to Indentation rule 6 of the Webkit coding style guidelines[1]: "Boolean expressions at the same nesting level that span multiple lines should have their operators on the left side of the line instead of the right side." This isn't currently tested by the cpplint. [1]
http://webkit.org/coding/coding-style.html
Attachments
Add checks for multi-line boolean operator placement
(5.05 KB, patch)
2009-07-21 14:09 PDT
,
Jakob Petsovits
levin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Jakob Petsovits
Comment 1
2009-07-21 13:01:46 PDT
Hm... I wonder if there are any cases where "||" and "&&" are allowed at the end of the line? Otherwise, this would be ridiculously easy.
David Levin
Comment 2
2009-07-21 13:05:26 PDT
> I wonder if there are any cases where "||" and "&&" are allowed at the end of the line?
No.
Jakob Petsovits
Comment 3
2009-07-21 14:09:24 PDT
Created
attachment 33213
[details]
Add checks for multi-line boolean operator placement ...like this? Seems the new check caught an issue in cpplint_unittest.py itself :P
David Levin
Comment 4
2009-07-21 14:41:35 PDT
> Seems the new check caught an issue in cpplint_unittest.py itself
Yeah, this tool was originally developed for Google style which doesn't have this rule, so as it gets closer to WebKit style, differences in WebKit and Google style are exposed (which is all good).
Adam Treat
Comment 5
2009-07-22 08:17:31 PDT
Landed with
r46224
.
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