Let's end the formatting mess

Andreas Pakulat apaku at gmx.de
Wed Nov 9 15:46:15 UTC 2011


On 09.11.11 17:21:31, Alexander Dymo wrote:
> >As a next step, I think we should do the same for all of KDevelop and
> >KDevplatform, to finally get rid the inconsistent formatting all
> >around.
> 
> Formatting is not a problem at all in our codebase.
> 
> >The question is, if we can find an uncrustify config which
> >satisfies all of us. Personally I would like to use the 2-spaces
> >indent style used in kdevplatform/language and kdevelop/languages/cpp
> >in all of KDevelop, because 2-spaces is more economical regarding
> >screen real-estate.
> 
> Thank you, but I prefer my pretty 4-space indentation in the code
> that I wrote.

Great bike-shedding topic. I agree with Alex on the 4-spaces thing,
especially since horizontal space is cheap these days.

IMHO the codebase actually is quite well formatted in general. Things
like 4 vs. 2 spaces or even opening-brace on its own line do not matter
that much when reading code as long as its consistent across a function
or file. And I don't think kdevelop has that much inconsistently
formatted files.

Since reformatting all the code also breaks easy blaming of files I'd
say its not worth it. It is worth to have some kind of formatting rules
so if writing new code its easy to format it the same way as the
existing code in the same module.

Andreas





More information about the KDevelop-devel mailing list