Re: [PHP_CodeSniffer] Alter specific sniff by extending a standard
| From: | Greg Sherwood | Date: | Tue, 15 May 2007 22:03:29 +0000 |
| Subject: | Re: [PHP_CodeSniffer] Alter specific sniff by extending a standard | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-27306@lists.php.net to get a copy of this message | ||
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