Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-9402

clang-format inconsistently indents initializer lists.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      Here are examples of clang-format indentation for initializer lists:

      mesos.send(v1::createCallAccept(
          frameworkId,
          offer,
          {v1::CREATE_DISK(
              source.get(),
              v1::Resource::DiskInfo::Source::MOUNT,
              None(),
              operationId.value())}));
      
      mesos.send(v1::createCallAccept(
          frameworkId,
          offer,
          {v1::CREATE_DISK(
               source.get(),
               v1::Resource::DiskInfo::Source::MOUNT,
               None(),
               operationId.value()),
           v1::RESERVE(reserved)}));
      

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            chhsia0 Chun-Hung Hsiao
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: