Chun-Hung Hsiao created MESOS-9402:
--------------------------------------

             Summary: clang-format inconsistently indents initializer lists.
                 Key: MESOS-9402
                 URL: https://issues.apache.org/jira/browse/MESOS-9402
             Project: Mesos
          Issue Type: Improvement
            Reporter: Chun-Hung Hsiao


Here are examples of clang-format indentation for initializer lists:
{code:cpp}
mesos.send(v1::createCallAccept(
    frameworkId,
    offer,
    {v1::CREATE_DISK(
        source.get(),
        v1::Resource::DiskInfo::Source::MOUNT,
        None(),
        operationId.value())}));
{code}
{code:cpp}
mesos.send(v1::createCallAccept(
    frameworkId,
    offer,
    {v1::CREATE_DISK(
         source.get(),
         v1::Resource::DiskInfo::Source::MOUNT,
         None(),
         operationId.value()),
     v1::RESERVE(reserved)}));
{code}
Note that in the second example, the arguments of the first operation in the 
initializer list are indented by one extra space. We should fix the indentation 
rule to make the first example align to the second one.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to