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

mesos-format inconsistently indents continued lines

    XMLWordPrintableJSON

Details

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

    Description

      mesos-format inconsistently formats continued lines. I would expect both return statements in the following example to be indented four spaces from the first non-whitespace character of the lines containing the return statements.

      struct S
      {
        S foo() { return *this; }
      };
      
      S function_with_an_annoyingly_long_name(int) { return {}; }
      
      S g()
      {
        int an_unconventionally_long_variable_name = 0;
      
        // (1) Normal `return` is indented four spaces relative to first
        // non-whitespace character on line.
        return function_with_an_annoyingly_long_name(
            an_unconventionally_long_variable_name);
      
        // (2) `return` with trailing member function call is indented four spaces
        // relative to first character of value producer.
        return function_with_an_annoyingly_long_name(
                   an_unconventionally_long_variable_name)
          .foo();
      }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            bbannier Benjamin Bannier
            Benjamin Bannier Benjamin Bannier
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: