You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Till Toenshoff (JIRA)" <ji...@apache.org> on 2015/04/15 02:29:58 UTC

[jira] [Created] (MESOS-2618) Update C++ style guide on function definition / invocation formatting.

Till Toenshoff created MESOS-2618:
-------------------------------------

             Summary: Update C++ style guide on function definition / invocation formatting. 
                 Key: MESOS-2618
                 URL: https://issues.apache.org/jira/browse/MESOS-2618
             Project: Mesos
          Issue Type: Documentation
            Reporter: Till Toenshoff
            Priority: Minor


Our style guide currently suggests two options for cases of function definitions / invocations that do not fit into a single line even when breaking after the opening argument bracket;

Fixed leading indention (4 spaces);
{noformat}
// 4: OK.  
allocator->resourcesRecovered(  
    frameworkId,  
    slaveId,  
    resources,  
    filters);
{noformat}

Variable leading indention;
{noformat}
// 3: In this case, 3 is OK.  
foobar(someArgument,  
       someOtherArgument,  
       theLastArgument);
{noformat}

There is a counter-case mentioned as for the latter; 
{noformat}
// 3: Don't use in this case due to "jaggedness".
allocator->resourcesRecovered(frameworkId,  
                              slaveId,  
                              resources,  
                              filters);
{noformat}


The problem here seems to be that the counter-case might not be well defined  on when it applies.

We might want to consider...
A. removing the variable leading option entirely
B. define the exact limits on when "jaggedness" applies



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)