Code formatting Re: SQL backend performance
Christian Stimming
stimming at tuhh.de
Thu Feb 25 03:49:39 EST 2010
Zitat von Phil Longstaff <plongstaff at rogers.com>:
>> http://lists.gnucash.org/pipermail/gnucash-devel/2009-August/026121.html and
>> my commit r18675 recently. I didn't apply this to the full source
>> tree so far
>> in order not to destroy some people's diffs which are still waiting to be
>> applied... I think the directory you're mentioning wasn't run through astyle
>> recently, so that would explain this issue.
>
> I think the best way to handle this formatting is to create an options
> file (perhaps src/c-code.style) which is then used everywhere:
>
> astyle --options=~/gnucash/src/c-code.style *.[ch]
>
> Christian, could you create such a central file with the options you are
> using?
Thanks for the idea. Indeed I could create such a file; however, the
astyle program unfortunately behaves slightly differently between
versions (which is why I mentioned usage of 1.24 in r18675). Hence,
the options itself are not enough; you would have to use the exact
same version of astyle as well every time.
The options file for our current style would contain these four lines:
indent-spaces=4
brackets=break
pad-oper
pad-header
> Does anyone know of a scheme formatter?
No. Currently we just use emacs' scheme indentation.
Regards,
Christian
More information about the gnucash-devel
mailing list