The KWin Coding Style Situation

Chani chanika at gmail.com
Sun Nov 28 21:18:55 CET 2010


On November 28, 2010 20:20:33 Martin Gräßlin wrote:
> Hi,
> 
> CC-int Plasma as I would like to get some opinion on it.
> 
> From various discussion on IRC and looking through review requests, it
> seems that we have a general problem with our coding style.
>  * The coding style is only used in KWin
>  * Developers seem to have problems with it, nobody really knows how the
> style should look like (I think I mostly get it, but only mostly)
>  * The coding style is not consistent

more than that, the placement of the braces is downright misleading. I get 
compile errors all the time from not noticing they're missing or in the wrong 
place.
it's a barrier to both reading and writing the code.

> 
> Personally I see this as a unneeded barrier to get into KWin development.
> Because of that I think we have to do something about it. For me the actual
> coding style does not matter as long as it's consistent - but that is not
> the case.
> 
> So I would propose the following:
> 1. Follow the rules from Plasma concerning coding style (and all other
> development matters - reviews, git, mergin...)
> 2. Switch to new coding style together with git migration (December, 20th)

+1000 :)

> 3. Reformat complete code base except clients with new coding style and
> submit this to a new branch. Merge it with master after let's say two
> weeks
> 
> Thoughts on that? What I dislike about step 3 is that this would make
> bisecting in future more difficult. But I see it as the only sane way to
> get a consistent coding style.
> 

a new branch? two weeks? why?
isn't there a program for reformatting code, that could just sweep over all of 
it and be one commit? even if it's not perfect, something that could at least 
fix the brace indentation...

and, svn has the ability to ignore ws changes (which a lot of these changes 
will be). I don't know about git though.

I say, get the style conversion over with quick. maybe just do it now instead 
of waiting for git :)

-- 
Chani
http://chani.ca
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20101128/03e9cc9b/attachment.sig 


More information about the Plasma-devel mailing list