Re: PHP_CodeSniffer as part of the pepr proposal process

From: Date: Sun, 06 May 2007 10:01:44 +0000
Subject: Re: PHP_CodeSniffer as part of the pepr proposal process
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-46641@lists.php.net to get a copy of this message
Daniel O'Connor wrote:
How difficult would it be to provide: 1. really clear directions on installing and running PHP_CodeSniffer over your proprosal 2. (and most desirable) the ability for a proposal (phps; or archive) to be evaluated automatically with PHP_CodeSniffer against PEAR standards before allowing a package to go from proposed to call for votes (or whatever stage you want to put it at)? I'll let someone who knows PEPr comment on how easy this would be, but I thought I'd show the output of PHP_CodeSniffer on PHP_Callback so people can see some sample output. All the errors relate to commenting in this case and so are fairly picky.
Greg -------------------------------------------------------------------------------- FOUND 29 ERROR(S) AND 1 WARNING(S) AFFECTING 21 LINE(S) -------------------------------------------------------------------------------- 20 | ERROR | There must be exactly one blank line before the tags in file
   |         | comment
22 | ERROR   | @category tag comment indented incorrectly. Expected 2 spaces
   |         | but found 1.
23 | ERROR   | @package tag comment indented incorrectly. Expected 3 spaces
   |         | but found 1.
24 | ERROR   | Content of the @author tag must be in the form "Display Name
   |         | <username@example.com>"
24 | ERROR   | @author tag comment indented incorrectly. Expected 4 spaces but
   |         | found 1.
26 | ERROR   | @license tag comment indented incorrectly. Expected 3 spaces
   |         | but found 1.
27 | WARNING | Invalid version "@@VERSION@@" in file comment; Consider "CVS:
   |         | <cvs_id>" instead.
27 | ERROR   | @version tag comment indented incorrectly. Expected 3 spaces
   |         | but found 1.
29 | ERROR | Missing @link tag in file comment 76 | ERROR | There must be exactly one blank line before the tags in file
   |         | comment
78 | ERROR   | @category tag comment indented incorrectly. Expected 2 spaces
   |         | but found 1.
79 | ERROR   | @package tag comment indented incorrectly. Expected 3 spaces
   |         | but found 1.
80 | ERROR   | Content of the @author tag must be in the form "Display Name
   |         | <username@example.com>"
80 | ERROR   | @author tag comment indented incorrectly. Expected 4 spaces but
   |         | found 1.
81 | ERROR | The order of @version tag is wrong in class comment 81 | ERROR | @version tag comment indented incorrectly. Expected 3 spaces
   |         | but found 1.
83 | ERROR   | @license tag comment indented incorrectly. Expected 3 spaces
   |         | but found 1.
84 | ERROR   | @since tag comment indented incorrectly. Expected 5 spaces but
   |         | found 1.
86 | ERROR | Missing @link tag in class comment 92 | ERROR | Doc comment for "$callback" missing 92 | ERROR | Doc comment for "$p2" missing 134 | ERROR | Doc comment var "[ UNKNOWN ]" does not match actual variable
   |         | name "$parameter" at position 1
134 | ERROR | Missing parameter name at position 1 134 | ERROR | Missing comment for param "[ UNKNOWN ]" at position 1 137 | ERROR | Missing @return tag in function comment 146 | ERROR | Doc comment var "[ UNKNOWN ]" does not match actual variable
   |         | name "&$parameter" at position 1
146 | ERROR | Missing parameter name at position 1 146 | ERROR | Missing comment for param "[ UNKNOWN ]" at position 1 149 | ERROR | Missing @return tag in function comment 159 | ERROR | Missing @return tag in function comment --------------------------------------------------------------------------------

« previous php.pear.dev (#46641) next »