Re: phpcs throwing warnings on trivial things
| From: | Helgi Þormar Þorbjörnsson | Date: | Sat, 05 Apr 2008 19:12:38 +0000 |
| Subject: | Re: phpcs throwing warnings on trivial things | ||
| References: | 1 2 3 4 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-49640@lists.php.net to get a copy of this message | ||
On Sat, Apr 5, 2008 at 4:56 PM, Joe Stump <joe@joestump.net> wrote:
> A long term solution to this might be to utilize PHP_Beautifier to
> > automatically do all of these changes for the developer. That way when
> > someone has the code 99% complete (as it is in Services_Facebook) and
> > there's technicalities that keep it from the 100% mark, PHP_Beautifier could
> > step up and make all of the changes necessary.
> >
>
> That'd be great. I don't think spacing in docblocks should constitute an
> "error". A few things I was actually missing (e.g. @param string The user's
> id <- no variable name), which is good, but checking spacing in dockblocks
> and considering it "not compatible with CS" is, in my opinion, still
> bureaucracy run amok.
>
> I've also found the following that I consider outright bugs:
> 1.) It constantly throws a WARNING for my @link lines that are over 85
> characters. It should, IMO, say "Oh, this is an @link tag and URI's can be >
> 85 characters so, if it's a valid URI (Validate::uri()) then I'm going to
> ignore this".
>
> 2.) It wants me to constantly align ='s. I'm all for that normally, but
> it's been asking me to put 19 spaces in to align them, which I think makes
> the code even more unreadable (I could be wholly alone on this):
>
> $n = 1;
> $this->longArrayNameHere[$this->myKeyName] = 2;
>
> I think it should ignore the = alignment if it's over, say, 5 characters
> or something. Or, maybe, we make a rule that CS warnings cannot ever hold a
> package back from being accepted.
Those 2 should not issue any warnings IMHO but well ... Didn't we recently
discuss 2) via Christian W. enhanced CS guideline proposal ?
Anyway not confirming to CS has never been a stopping point for accepting
packages, we tend to ask people to fix the major violations and then tell
them to improve over time and we'd keep a eye on the package so it would in
the end adheir to most rules that are important.
It might have changed tho, I wasn't around for some time 2 years ago ;)
- Helgi