Re: Request for PHP_CodeSniffer : support DockBlock TemplatesofphpDocumentor
| From: | Jeff Dickey | Date: | Mon, 12 Nov 2007 14:14:28 +0000 |
| Subject: | Re: Request for PHP_CodeSniffer : support DockBlock TemplatesofphpDocumentor | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-48448@lists.php.net to get a copy of this message | ||
Greg Sherwood wrote:
> Gregory Beaver wrote:
>> Greg Sherwood wrote:
>>
>>> I do need to do something though. Even if I remove the error and allow
>>> docblocks to *begin* with /** rather than exactly match /**, you'll get
>>> errors for all the tags you have omitted because of your templates.
>>>
>>> There are a lot of rules defined in the current PEAR docblock standards
>>> that will need changing in phpcs for this:
>>> http://pear.php.net/manual/en/standards.sample.php
>>>
>>
>> For easing your pain, I recommend simply skipping docblock templates
>> with a warning that it was found and skipped.
> I can certainly do that, as long as it is okay that this code:
>
> class MyClass {
> /**#@+
> * Sorting functions for the file list
> * @param string
> * @param string
> * @access private
> */
> function sortfiles($a, $b)
> {
> // code here
> }
>
> function mystrucsort($a, $b)
> {
> // code here
> }
> /**#@-*/
> }
>
> Will not report an error about mystructsort not containing any comment
> about what it does (or is used for) specifically, and none of the
> standard docblock errors like no @return or missing parameter names.
>
> Does this sound fine?
>
> Greg
{*-- delurk --*}
Greg, I've been beating on CS since I stumbled across it a few weeks
back. My code all uses PHPDocumentor and I discovered and (ab?)used "the
nice template feature" before I knew of CS. I've also been taking OPM to
maintain OPC (other people's code) and retro-document it. This is just
to clue in background for the following plea:
please, pretty please, with Black Forest cherries on top, do not, I say
again, DO NOT disable that warning unless you are RUDDY well sure that
you are inside a (properly terminated) template block. It would be Very
Nice if you also bitched about mismatches between template-block-start
and template-block-end tokens. Yes, it's pretty easy to eyeball that,
but having CS spit out properly pithy messages allows automation to
catch it much more easily.
Just my two rupiah worth as a "user".
{*-- /delurk --*}
Jeff Dickey