astyle options [Was: Scaheme formatting with astyle]

Christian Stimming stimming at tuhh.de
Sun Feb 28 08:48:35 EST 2010


Am Donnerstag, 25. Februar 2010 schrieb Thomas Troesch:
> > http://lists.gnucash.org/pipermail/gnucash-devel/2009-August/026121.html

I've committed a "make indent" target in the top-level Makefile which uses the 
options directly on the command line. You can try it, BUT please don't commit 
the result right away and especially not for parts of the source code which 
you don't work with anyway.

> > This part of the astyle option syntax changed recently. It used to be
> > --pad=oper (with equal sign), but with astyle-1.24 it is --pad-oper
> > --pad-header (both with dash, no equal sign anymore).
> 
> Wow.  Hopefully the options produce the same results in the different
> versions...

No, specifically this is not the case, as I have mentioned before. Astyle 
produces slightly different output in one version compared to the other. 
That's why I always noted the astyle version number in the indentations I did 
so far.

I don't have a solution here, except noting that we still won't have any 
automatic way which "magically" and identically on all developer machines will 
always produce the same indentation style. What we could do is to install the 
identical astyle version (1.24) and we would get that, but with different 
version numbers it won't be possible to have the same indentation done 
automatically everywhere.

Regards,

Christian

PS: Again the astyle command line options:

For astyle-1.24 (recommended)

astyle --indent=spaces=4 --brackets=break --pad-oper --pad-header --
suffix=none  *.[hc]

For previous versions of astyle (1.23, 1.22):

astyle --indent=spaces=4 --brackets=break --pad=oper --suffix=none  *.[hc]


More information about the gnucash-devel mailing list