Tom aka DeepDiver has already done amazing QA work with setting up a
jenkins server for continuous integration. Now we need to decide on a
code style that we can teach PHP CodeSniffer. But why use a common code
style at all, when every one of us is already familiar with his best
practice? Code is read more often than it is written. And reading is a
lot easier when I am already familiar with the formatting. Especially,
when hunting bugs in other peoples code.
Instead of raising another coding guidelines discussion I would like
each one of you to choose from the two general approaches we have:
[extend] We extend the guidelines on http://owncloud.org/dev/contribute/
to create the level of detail needed for PHP CodeSniffer and gradually
increase the number of checks over time
[adopt] We adopt a standard code style like PEAR [1] or Squiz and go
from
there<http://www.squizlabs.com/php-codesniffer/how-much-does-your-standard-check>.
PEAR was meant to increase readability and Squiz is very strict [2].
PEAR for example reqires a space between control structures and
brackets: "} else {" instead of "}else{".
Personally, I vote for the adoption of a mix of PEAR and Squiz as a
solid base where we add our current guidelines, eg: use tabs to indent
and placement of brackets.
What is your opinion?
[1] http://pear.php.net/manual/standards.php
[2]
http://www.squizlabs.com/php-codesniffer/how-much-does-your-standard-check
--
Jörn Friedrich Dreyer ([email protected])
Software Developer
ownCloud GmbH
Your Data, Your Cloud, Your Way!
ownCloud GmbH, GF: Markus Rex, Holger Dyroff
Schloßäckerstrasse 26a, 90443 Nürnberg, HRB 28050 (AG Nürnberg)
_______________________________________________
Owncloud mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/owncloud