For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > May 2007 > Re: [PEAR] [PHP_CodeSniffer] Alter specific sniff by extending a









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PEAR] [PHP_CodeSniffer] Alter specific sniff by extending a
Greg Sherwood

2007-05-15, 7:01 pm

Hi Torsten,

One feature missing from PHP_CodeSniffer's new coding standard class is
the ability to exclude a sniff, so you'll have to specify the list of
PEAR sniffs that you want to include and leave out the
ControlSignatureSniff from the list.

So you'll have your own standard directory, one sniff that replaces the
PEAR ControlSignatureSniff, and a coding standard class that lists
almost all the PEAR and Generic sniffs, minus the ones you don't want.
Note that you'll need to include the same Generic sniffs that the PEAR
standard does so your standard is complete.

I'd encourage you to submit a feature request to allow you to do this
more easily.

Greg


roehr@zilleon.com wrote:
> Hi,
>
> I would like to create my own coding standard based on PEAR but with a few exceptions/differences. E.g. I would like to change the ControlSignature sniff.
>
> I can create my own standard which uses all PEAR sniffs and my own ControlSignatureSniff but it still uses PEAR's ControlSignatureSniff as well. How can I avoid this?
>
> Thanks and best regards,
> Torsten
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com