[webkit-dev] Ambiguity in the style guide

David Levin levin at chromium.org
Mon Mar 19 23:46:29 PDT 2012

On Mon, Mar 19, 2012 at 10:37 PM, Martin Robinson <mrobinson at webkit.org>wrote:

> Hello WebKittens,
> While I am loathe to take up list space with another style guide
> threads, Eric Seidel recently pointed out to me some ambiguities in
> the style guide at https://bugs.webkit.org/show_bug.cgi?id=81602.
> Namely sections three and four of the "#include Statements" section.
> The relevant sections are:
> "Other #include statements should be in sorted order (case sensitive,
> as done by the command-line sort tool or the Xcode sort selection
> command). Don't bother to organize them in a logical order."
> and
> "Includes of system headers must come after includes of other headers."
> The ambiguities are:
> 1. Are WTF and other WebKit headers included like #include
> <project/foo.h> considered "system headers"?

My guideline has been if the header is include with < instead of ", then it
comes after, which is consistent with the sort order of < and ", so it all
seems to come down to sort using ascii order.

> 2. Exactly what sort order is desired (e.g. capitals before lower case)?

Yes (which is case sensitive, as done by the command-line sort tool)

> Hopefully this isn't seen as just a pedantic exercise. I'm interested
> in answering these questions so that I can modify check-webkit-style
> to catch these errors. On the other hand, if the exact nature of these
> rules is seen as unimportant, perhaps we could just remove that part
> of the guide.
> --Martin
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20120319/0ac236f3/attachment.html>

More information about the webkit-dev mailing list