[TYPO3-v4] Mr. Jenkins will complain about CGL issues

Ernesto Baschny [cron IT] ernst at cron-it.de
Wed Apr 20 16:09:40 CEST 2011


Stefano Kowalke schrieb am 20.04.2011 00:26:

>> Then some things I *was* able to figure out, and here is my feedback:
>>
>> Type ValidCommentLineLength mentions "80 chars limit" for comments.
>> There is no rule about it in our CGL. 
> 
> You find this rule at page 8 of current CGL. I am not a friend of this
> limitation, I just implement it as it is. But there was a discussion on
> forge at [1].

Yes, true. I would at least mark this test as "Low Priority". It makes
about 20% of all current warnings we have.

>> Category CharacterAfterPHPClosingTag: "No newline character is allowed
>> after php closing tag; expect " ?> " but found " ?>\n ". This is not a
>> bug, but allowed as of the CGL. Different IDE's do it automatically and
>> it doesn't hurt the resulting output (PHP ignores it).
> 
> I took this rule from page 8: "There must be no empty lines after the
> closing PHP tag. Empty lines after closing tags break output compression
> in PHP and/or result in AJAX errors."
> 
> I thought with empty lines also newlines (\n) are mean. Is this not correct?

Yes, but a "empty line" is when there are two \n\n at the end. Just one
is ok and just finishes the ?> line (its not "empty" and won't generate
any trouble with PHP.

>> Type DisallowElseIfConstruct: is not relevant for us
> 
> Have a look at page 12: "TYPO3 code must not use the else if construct."

Ah ok, I thought it was choking on "elseif" also, but I see its fine.
Only "else if" is denied.

> I am fine with any suggestion, but at this time we only implement and I
> enabled just this sniffs, which are covered by the current CGL.

Great, looks cool! And nice that we can see in future checks if "more
CGL issues" arose compared to the previous build, so we can then make
sure no new issues are introduced in new patches.

Is it already integrated with Gerrit? Do you have any example of a
review where it "hit"?

Thanks!


More information about the TYPO3-project-v4 mailing list