Menu

#661 nl_squeeze_ifdef must not add newline

Future
fixed
nobody
None
5
2016-03-18
2016-02-03
No

This is related to ticket #611 (see comment #5).

Setting nl_squeeze_ifdef to true changes

#ifdef SOMETHING
void foo ()
{
}
#endif // or #else

to

#ifdef SOMETHING
void foo ()
{
}

#endif // or #else

thus adding a newline right before #endif // or #else (which it must not if there's none).

Discussion

  • Anonymous

    Anonymous - 2016-02-04

    The newline is probably because of nl_after_func_body = 2, but it should not in case of #endif or #else.

     
  • Anonymous

    Anonymous - 2016-02-05

    Oops! The above example was a bad one, because it qualifies for ifdef_over_whole_file().

    Option nl_squeeze_ifdef works as expected now.

    This ticket can be closed.

     
  • Ben Gardner

    Ben Gardner - 2016-03-18
    • status: open --> fixed
     
MongoDB Logo MongoDB