Re: PHPCS: too much noise?
| From: | Jonathan Street | Date: | Tue, 11 Nov 2008 10:08:27 +0000 |
| Subject: | Re: PHPCS: too much noise? | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-51042@lists.php.net to get a copy of this message | ||
Hi,
I'm currently going through the process of putting together a couple
of packages myself. These will be the first packages I've been the
sole lead on. I can imagine the frustration with putting together a
complete package and then going back to run phpcs. I was relatively
lucky in that I ran phpcs fairly early and then matched what I was
doing to match. Making the initial check and going back to make
corrections was not fun though.
On the question of whether this level of detail is useful I don't
always look at the autogenerated docs and instead just read the phpdoc
comments in the file. In this situation having the tag, variable
type, variable name and comment vertically aligned makes it far easier
to read.
Regards,
Jonathan Street
2008/11/11 Firman Wandayandi <firmanw@gmail.com>
>
> 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/
>
> --
> PEAR Development Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>