incubator-zeta-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Derick Rethans <der...@apache.org>
Subject Re: [zeta-dev] Documenting our coding style
Date Fri, 26 Nov 2010 13:23:47 GMT
On Tue, 16 Nov 2010, Tobias Schlitt wrote:

> for another project I needed to give advice on the coding standard used
> by Apache Zeta Components. There is some very old version of the eZ
> Publish coding style in [1] (from 2001) but no reliable, recent source.
> So I think we should document our coding style on the website.
> 
> Please complete / correct my following brainstorming:
> 
> - Indentation with 4 spaces
>   - After a "{"
>   - On breakup of long lines (> 78 chars) after a "("
> - "{" and "}" on a new line
> - 1 space after "(" and before ")"
> - No space after "[" and before "]"
> - 1 space after ","
> - 1 space before and after "."
> - Almost always camelCase
>   - classes always start with ezc followed by an upper case char
>   - constants all in upper case with "_"


There is also a script at 
http://svn.apache.org/repos/asf/incubator/zetacomponents/scripts/syntax-check.sh 
that has a few rough automated checks. 

regards,
Derick

-- 
http://derickrethans.nl | http://xdebug.org
Like Xdebug? Consider a donation: http://xdebug.org/donate.php
twitter: @derickr and @xdebug

Mime
View raw message