Code formatting Re: SQL backend performance

Phil Longstaff plongstaff at
Thu Feb 25 08:51:06 EST 2010

On Thu, 2010-02-25 at 09:49 +0100, Christian Stimming wrote:
> Zitat von Phil Longstaff <plongstaff at>:
> >> 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/ which is then used everywhere:
> >
> >     astyle --options=~/gnucash/src/ *.[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

Hmmm...   I have Ubuntu 9.10 with astyle 1.22 which doesn't even have

> > Does anyone know of a scheme formatter?
> No. Currently we just use emacs' scheme indentation.

Can that be run from the command line (e.g. emacs -x scheme-indentation
file.scm) with standard options so that anyone creating or modifying an
scm file can check it's indented before commit?


More information about the gnucash-devel mailing list