Re: PHPCS: too much noise?
| From: | Firman Wandayandi | Date: | Tue, 11 Nov 2008 08:31:11 +0000 |
| Subject: | Re: PHPCS: too much noise? | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-51041@lists.php.net to get a copy of this message | ||
Hi,
On Tue, Nov 11, 2008 at 3:17 PM, Alexey Borzov <borz_off@cs.msu.su> wrote:
> Hi,
>
> I just managed to receive a first "bug" for HTTP_Request2 package,
> http://pear.php.net/bugs/bug.php?id=14990 dealing with supposed
> "Coding
> standards violations":
> http://pear.cweiske.de/codingstandards/HTTP_Request2.html
>
> I dutifully looked through the results and couldn't help noticing that 95%
> of stuff there is petty complaints dealing with PHPDoc comments:
>
Same here, I've just released my package yesterday and today I got
"bug" http://pear.php.net/bugs/bug.php?id=14989
I have no idea since when this CS rules applied and yes almost of them
are about inline doc comments.
> I'm quoting from the "errors" of HTTP_Request2 class:
>
> error 36 @category tag comment indented incorrectly. Expected 1
> spaces but found 3.
> error 37 @package tag comment indented incorrectly. Expected 2 spaces
> but found 4.
> --- last time I checked, we DON'T have any coding standards that are dealing
> with indenting the stuff within docblocks.
>
>
> error 65 Line indented incorrectly; expected at least 4 spaces, found
> 3
> error 78 Line indented incorrectly; expected at least 4 spaces, found
> 3
> error 80 Line indented incorrectly; expected at least 4 spaces, found
> 3
> --- this deals with the first line of doc comment blocks having an indent of
> 3 spaces, to align the asterisks with actual thing being documented:
> /**
> * Request URL
> * @var Net_URL2
> */
> protected $url;
>
>
>
> error 173 Expected 1 space before variable type
> error 173 Doc comment var "Request" does not match actual variable
> name "$url" at position 1
> error 173 Expected 1 space after the longest type
> --- this once again deals with indenting the stuff within PHPDoc comments
> (remember, we DON'T have any standards for this) and with the fact that
> phpDocumentor is perfectly capable of parsing the line
> * @param string|Net_Url2 Request URL
> and building proper docs without me repeating the parameter name:
> * @param string|Net_Url2 $url Request URL
>
>
> And this BS goes on and on and on...
>
> Now a question: how is one supposed to find actual coding standards
> violations in this steaming pile? Another question: if doc comments are
> mostly intended for phpDocumentor, which is perfectly capable of building
> proper docs without caring about such "errors", what's the point?
>
Same question for me either. Who care about indentation and how many
spaces number in inline doc comments as long as it properly generated
as API doc by phpDocumentor.
--
Firman Wandayandi
http://firmanw.com/