Menu

#618 nl_multi_line_cond=true does not work

Future
closed
nobody
None
c
5
2016-03-22
2015-01-23
Sean Ahern
No

The "nl_multi_line_cond=true" configuration option does not seem to make a difference to code. With that as the only line in the configuration, the following code change happens:

This:

void
foo()
{
  if (a == b ||
    a == b ||
    a == b ||
    a == b ||
    a == b ||
    a == b ||
    a == b ||
    a == b) {
    statement;
  }
}

becomes:

void
foo()
{
    if (a == b ||
        a == b ||
        a == b ||
        a == b ||
        a == b ||
        a == b ||
        a == b ||
        a == b) {
        statement;
    }
}

When I think it should become:

void
foo()
{
    if (a == b ||
        a == b ||
        a == b ||
        a == b ||
        a == b ||
        a == b ||
        a == b ||
        a == b)
    {
        statement;
    }
}

Note that the closing ) occurs on a different line from the 'if', yet there is not a newline before the {.

Discussion

  • Sean Ahern

    Sean Ahern - 2015-01-23

    This is with version 0.61.

     
  • Guy Maurel

    Guy Maurel - 2016-03-22
    • status: open --> closed
     
  • Guy Maurel

    Guy Maurel - 2016-03-22

    The option you are looking for is:
    nl_if_brace=force