[En-Nut-Discussion] Tons of trailing spaces in our source code
Ole Reinhardt
ole.reinhardt at embedded-it.de
Tue Oct 19 11:51:08 CEST 2010
Hi all,
> But in general there should be tools existing that perform such small
> services. So called "code beautifier" can keep indents and brackets
> correct aligned and exchange tabs between #define and value by the
> defined number of spaces too. They even correct
> if( bla ==blubb) to if (bla==blubb) and so on.
I don't agree to use a code bautifier at least not to let it correct
everything. It might end up with a fully redesigned layout and that's
not what I intended to do. In my eyes everybody has a different coding
style and he should. In a project like NutOS it's advised to use a
common coding style but I don't see any real need to reformat
everything.
So let's first check if the SVN can do the job as you just proposed
otherwise just let us use a tool to correct just the spaces.
Btw: If mentioned diff generating larger diffs where just spaces have
changed. Just use the -bB optons for diff to ignore any space changes at
all.
The discussion whether we better use spaces or tabs for indentation will
show up at least that much options as persons are discussing. In my eyes
using 4 spaces for indentation was the Nut/OS coding style for the last
6 or 7 years, so I don't see any need to change this coding style today.
Btw: Using tabs for indentation just works on the beginning of a line.
using it to align #defines etc. does not work at all and ends up with
toal chaos if people use different indentation width.
Just _my_ 2 cents :)
Ole
--
Thermotemp GmbH, Embedded-IT
Embedded Hard-/ Software and Open Source Development,
Integration and Consulting
http://www.embedded-it.de
Geschäftsstelle Siegen - Steinstraße 67 - D-57072 Siegen -
tel +49 (0)271 5513597, +49 (0)271-73681 - fax +49 (0)271 736 97
Hauptsitz - Hademarscher Weg 7 - 13503 Berlin
Tel +49 (0)30 4315205 - Fax +49 (0)30 43665002
Geschäftsführer: Jörg Friedrichs, Ole Reinhardt
Handelsregister Berlin Charlottenburg HRB 45978 UstID DE 156329280
More information about the En-Nut-Discussion
mailing list