thomas at intevation
Sep 29, 2004, 8:46 AM
Post #1 of 1
* Renaud Deraison <deraison [at] nessus> [20040916 22:58]:
Indentation (was: Re: remove trailing spaces in code?)
> On Thu, Sep 16, 2004 at 09:32:29PM +0200, Jan-Oliver Wagner wrote:
> > I wonder, whether I should remove trailing spaces in
> > the source code systematically.
> That's not necessary. It will add a lot of confusion diff-wise, for very
> little gain (they compress very well ;)
Removing extra spaces is not the only thing that may need cleanup,
but there are many inconsistencies in indentation, too.
I've identified the options for GNU indent to match the most common
indentation style in nessus-core:
indent -bli0 -cli2 -ip2 -lps -npcs -ncs -nsaf -nsai -nsaw -nip -cp1 -bad -bap
It would be very helpful for me if I may re-indent at least the
functions I'm changing, or even better the whole file.
The diff options -wbB can prevent much confusion with changing
amount of spaces or newlines. You can even add this to the syncmail
script for the commit messages, if you change the 'difftype'
parameter in the python source.
As an example, compare the output of
cvs diff -uwbB -r126.96.36.199 -r188.8.131.52 nessus/preferences.c (463 lines)
with the same diff without 'wbB' options (1177 lines).
To reduce confusion even more, I can check in the re-indented file
before doing real changes.
Email: thomas [at] intevation