Compiler format command with #ifdef etc. statements

03 Sep 2012

Hi!

I was wondering if there would be a way to get the compiler format #ifdef etc. statements correctly? Now it always makes them start from the first column no matter where in a structure they are. This makes it harder to see where they start and end.

I would like to sometimes use the #ifdef statements as if-else structures to minimize the code size by e.g. leaving out large pieces of the code when not debugging.

Would this functionality be possible to implement in the compiler formatting or do you have a good reason not to do it?

-Axel

03 Sep 2012

Hi Axel,

We use Artistic Style to do the formatting. Whilst we won't provide people "options" on how to format (as we'd like consistent coding style), certainly happy to consider "improvements"; maybe you can take a look and see if there is any way to achieve the behaviour you are after.

We're currently running a fairly old version, so you may find some new features that weren't available at the time we chose the configuration. Happy to look at upgrading it if it proves necessary.

Thanks! Simon

03 Sep 2012

Hi Simon!

Thank you for the information! I will look at it if I will have time.

- Axel