[TYPO3-50-general] CGL discussions (misced topics)

Karsten Dambekalns karsten at typo3.org
Mon Jun 8 13:03:40 CEST 2009

Hi Tim.

On 28.05.2009 0:32 Uhr, Tim Eilers wrote:
> * how i should put the original CodeSniffer compatible Files and Tests
> into the svn? They will not be compatible very much with FLOW3 and need
> to be put in special pathes of CodeSniffer itself.

Well, the coding standard does not have to be installed with 
CodeSniffer, it can be given with full path to the tool:
  phpcs --standard=/path/to/MyStandard Test.php

I'd put them into Resources/Private/PHP/... in the FLOW3CGL package.

> * what should i do with issues i find while letting the already ported
> sniffs checking the FLOW3 packages? a) nothing? b) notice the developer
> of the code by private mail? by ticket? c) correct it by myself and
> commit it?

I'd say if it's clear a CGL violation happened, ignore it for now. If in 
doubt, dicuss. Then, when the sniffs are working I'd check the packages 
in the distribution and fix stuff (I am really looking forward to those 
checks being available!). So, no need for you to invest time into ticket(s).

> * what about one line else's? one line ifs without braces are allowed in
> the CGL, but what about one line elses without braces? my opinion is: if
> one line ifs without braces are allowed, one line elses should be also.

Thinking about it I start to dislike if/else without braces at all. The 
only place where such a construct is helpfully terse is simple checks 
followed by throw and no else clause. Hm. Other than that curly braces 
lead to cleaner code and are less error-prone.

What do the others think?

> * what about to mention that checking possibility to check yourselves
> code in the FLOW3 package's documentation? give a hint to the FLOW3CGL
> package and create a own documentation there? Or give a short
> documentation how to checkout the Sniffs i am porting now and how to
> install and check the code with original CodeSniffer?

The package should have it's own documentation explaining it's use and 
pointing to the CGL. The CGL should point to the FLOW3CGL documentation 
/ package in turn.


More information about the TYPO3-project-5_0-general mailing list