[Owncloud] Coding style

Thomas Tanghus thomas at tanghus.net
Mon Nov 12 02:31:36 UTC 2012


On Sunday 11 November 2012 20:18 Diederik de Haas wrote:
> 2. Formatting of the code is inconsistant.
> Example: Some use 2 spaces for indenting, others 4 and others use tabs and
> according to checkstyle/Jenkins quite a lot of them are even 'wrong'.

ownCloud is a very fast-moving project. The code style [*] was specified not 
that long ago, and there's still a lot of code that needs to be "corrected". 
Whenever a developer or a potential contributor has the time and sees the 
chance for correcting the code style, a pull request for that is much 
appreciated.

> 2. In Eclipse you can define a code style and with a press of a
> button/key-combo you can apply that style to the current page.
> You can also export that definition so you can share it with others.
> I would be surprised if that doesn't apply to other editors/IDEs as well.

KDEs Kate/KDevelop also has some nice tricks for that.

> * I'm a Java  developer with little to no experience with php

I guess the same applies for all projects regardless of the language used. As 
mentioned PRs are welcomed. Best practice would be to limit them to one 
class/file as it makes them easier to review.

[*] http://owncloud.org/dev/coding-style-guide/

-- 
Med venlig hilsen / Best Regards

Thomas Tanghus



More information about the Owncloud mailing list