[webkit-dev] unwritten rules of webkit style
pkasting at google.com
Wed Sep 2 09:46:20 PDT 2009
On Wed, Sep 2, 2009 at 8:40 AM, David Levin <levin at chromium.org> wrote:
> * There should be a *single* space after punctation and before the next
> There should only be a single space before end of line comments.
I don't think either of these are unwritten rules. Both (especially the
second) are frequently seen with two spaces. I frequently see "close of #if
or namespace" EOL comments with one space before //, and other EOL comments
with two. I wouldn't mind standardizing (my preference is two spaces) but
I'm not sure we can yet.
> Additional clauses in a conditional may be indented 4 extra spaces to
> visually separate them from the statement to be executed.
> Like this
> if (condition1 && condition2)
I note you used "may" instead of "should" or "must". It seems like we
should pick the right thing and say "must". My reading of the current style
guide is that the current recommended indentation for this case is:
I don't believe I've seen cases like the one you give.
> Files who should end with newlines.
s/who//. In fact it might be clearer to say "Files should end with a
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev