Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Nessus: devel
Indentation (was: Re: remove trailing spaces in code?)
 

Index | Next | Previous | View Flat


thomas at intevation

Sep 29, 2004, 8:46 AM


Views: 669
Permalink
Indentation (was: Re: remove trailing spaces in code?)

* Renaud Deraison <deraison [at] nessus> [20040916 22:58]:
> 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 -r1.50.2.6 -r1.50.2.7 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.

Thomas

--
Email: thomas [at] intevation
http://intevation.de/~thomas/

Subject User Time
Indentation (was: Re: remove trailing spaces in code?) thomas at intevation Sep 29, 2004, 8:46 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.