[Webkit-unassigned] [Bug 12313] New: Need code style guidelines for multi-line boolean expressions

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 18 09:30:25 PST 2007


http://bugs.webkit.org/show_bug.cgi?id=12313

           Summary: Need code style guidelines for multi-line boolean
                    expressions
           Product: WebKit
           Version: 420+ (nightly)
          Platform: Macintosh
        OS/Version: Mac OS X 10.4
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKit Website
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: ddkilzer at webkit.org


The code style guidelines page on the web site needs style guidelines for
multi-line boolean expressions per Bug 12305 Comment #12.  Something to the
effect of:

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.

Wrong:

    return attr->name() == srcAttr ||
           attr->name() == lowsrcAttr ||
           (attr->name() == usemapAttr && attr->value().domString()[0] != '#');

Right:

    return attr->name() == srcAttr
        || attr->name() == lowsrcAttr
        || (attr->name() == usemapAttr && attr->value().domString()[0] != '#');


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list