Ticket #48 (closed enhancement: fixed)

Opened 1 year ago

Last modified 4 months ago

Improve check-style target

Reported by: schst Assigned to: rist
Priority: minor Milestone: 0.6.0
Component: Build System Version: SVN-trunk
Keywords: Cc:

Description

PHP_CodeSniffer should be used to automate the CS checks.

This requires, that we define exact coding styles and implement them as rules for PHP_CodeSniffer.

Change History

05/27/07 22:51:39 changed by schst

  • owner changed from mikey to schst.

05/27/07 22:51:42 changed by schst

  • status changed from new to assigned.

11/28/07 15:42:10 changed by mikey

  • milestone set to 0.5.0.

12/06/07 21:28:00 changed by mikey

  • owner changed from schst to rist.
  • status changed from assigned to new.

12/06/07 21:28:09 changed by mikey

  • owner changed from rist to mikey.
  • status changed from new to assigned.

12/06/07 21:28:27 changed by mikey

  • owner changed from mikey to rist.
  • status changed from assigned to new.

12/06/07 21:29:28 changed by mikey

Changesets 1125 and 1126 imported a first version of this.

12/06/07 23:11:52 changed by mikey

Some remarks after first test runs:

  • There seems to be a problem with the indention in switch statements. See net::stubbles::events::stubEventsXJConfInitializer::getDescriptor() for an example.
  • Missing doc comments seem not to be recognized, net::stubbles::ioc::stubBindingScope::getInstance() had no doc comment.
  • Current rule for cast statements require no space after cast statement, but should be that a space is required. See net::stubbles::ipo::request::filters::stubFloatFilter::execute() for an example.
  • Conditional includes with require should not be an error, see net::stubbles:util::ext classes.

12/07/07 12:50:08 changed by rist

  • status changed from new to assigned.

12/07/07 18:56:20 changed by rist

Fixed issues - except for switch statement because there are conflicting sniffs which interfere with each other. Docblock sniffs are also yet missing. I'll continue the work on this.

12/21/07 17:49:40 changed by rist

switch statements work now with changeset:1173. Docblocks will be next ...

01/02/08 14:57:12 changed by mikey

Meanwhile PHP_CodeSniffer 1.0 was released. One new feature is that you can specify the full path to a coding standard, which would allow us to remove the copy-standards target from our build file.

Unfortunately there was a change in our of the sniffs we are using, too: Squiz ClassDeclarationSniff now ensures there is one blank line after a class closing brace We need to replace this with our own, as we do not want blank lines after class closing braces.

01/11/08 10:11:36 changed by mikey

  • milestone changed from 0.5.0 to 0.6.0.

01/18/08 14:09:44 changed by rist

Updated PHP_CodeSniffer to v1.0 and removed unnecessary build targets. Omitted also SquizClassDeclarationSniff and created own sniff. Now there is only the check-style target... see changeset:1257 and changeset:1261.

01/29/08 12:30:41 changed by rist

  • status changed from assigned to closed.
  • resolution set to fixed.

Coding Standards are now established, with these last improvements:

docblocks checks:

whitespace checks:

misc: