Let's end the formatting mess

Andreas Pakulat apaku at gmx.de
Wed Nov 9 21:51:30 UTC 2011


On 09.11.11 21:01:33, David Nolden wrote:
> There is some code which certainly does need reformatting, I've
> verified that in many different places right now. There are evel files
> where basically _all_ common coding-style rules are mixed
> (tabs/spaces, indentation-depth, spaces within function-call parens,
> etc. etc.). You can be sure that, once even more different developers
> have touched sublime etc., that code will suffer from the same problem
> too.

Would've been nice if you listed some samples, for the sake of comparing
your and my definitions of 'messy' :)

> The good thing is that, when we define clear mandatory uncrustify
> configurations for specific portions of the code, we won't have these
> problems in future anymore.

Well, only if you implement either formatting on the fly while typing
or automatically format on each save. And no option to undo either.
Otherwise people will forget the formatting every once in a while and
you may end up with messy code again. ;) Also you'll have to require
uncrustify for working on kdevelop sources, otherwise somebody may run
astyle again before committing.

Oh and I didn't intend to start a bikeshedding discussion on the
formatting rules. As you I don't really care about most of the details,
just the 2-spaces thing is a bit too hard for my eyes to ignore. :)
All other rules just need to be 'sane', i.e. make the code more readable
and not trying to obfuscate it.

Andreas
 




More information about the KDevelop-devel mailing list