incubator-zeta-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tobias Schlitt <tob...@schlitt.info>
Subject Re: [zeta-dev] Documenting our coding style
Date Thu, 18 Nov 2010 07:29:30 GMT
Hi Jerome,

On 11/17/2010 03:28 PM, Jerome Renard wrote:

> On Tue, Nov 16, 2010 at 1:06 PM, Tobias Schlitt <tobias@schlitt.info> 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 "_"

> Looks good.

> A precision might be needed though about the 78 chars limit :
> As far as I remember (correct me if I am wrong) the limit it 80 chars
> but since there is one space after the "(" and before ")" that
> makes the string longer or equal than 80 chars hence the line breakup.
> 
> (Not sure I am completel clear here :/)

yeah, in fact there is a limit of 80 chars per line. I think I had 78 in
mind from text stuff.

Regards,
Toby

-- 
Tobias Schlitt        http://schlitt.info        GPG Key: 0xC462BC14
Want to hire me? Need quality assurance?            http://qafoo.com
eZ Components are Zeta Components now!          http://bit.ly/9S7zbn

Mime
View raw message