Code::Blocks

Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: libfab on July 25, 2008, 07:55:28 pm

Title: Source code formatter behavior
Post by: libfab on July 25, 2008, 07:55:28 pm
The source code formatter plugin is one of the most useful ones, but I've recently had issues with in the following contexts:

if (condition)
    (macro)
else
    (...)

what happens is that when the macro does not end in a semi-colon, the plugin outputs:

if (condition)
   (macro)
   else
      (...)

which is undesirable indentation. Everything comes back to normal on adding an (irrelevant) semi-colon at the end of (macro).

As the plugin's algorithm is based on semicolon separators, I'm afraid that the issue should be tricky to fix in its most general form.

Best, Fab