Re: [PHP_CodeSniffer] Alter specific sniff by extending a standard
| From: | Greg Sherwood | Date: | Thu, 17 May 2007 00:43:49 +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-27316@lists.php.net to get a copy of this message | ||
roehr@zilleon.com wrote:
These three ways should give me the same results, right?: 1. Use PEAR Standard 2. Create own standard that includes 'PEAR' 3. Create own standard that includes 'Generic/Sniffs/Formatting/MultipleStatementAlignmentSniff', 'Generic/Sniffs/Functions/OpeningFunctionBraceBsdAllmanSniff', 'Generic/Sniffs/NamingConventions/UpperCaseConstantNameSniff', 'Generic/Sniffs/PHP/LowerCaseConstantSniff', 'Generic/Sniffs/PHP/DisallowShortOpenTagSniff', 'PEAR/Sniffs/Commenting', 'PEAR/Sniffs/ControlStructures', 'PEAR/Sniffs/Files', 'PEAR/Sniffs/Functions', 'PEAR/Sniffs/NamingConventions', 'PEAR/Sniffs/WhiteSpace' (The generic sniffs that PEAR uses and all PEAR sniffs) But the third way does not seem to include the same sniffs as option one and two because I get less warnings/errors. You are right; all three ways should work the same. However, there was a problem merging two arrays together in that code, which was causing the 3rd way to not include any of those PEAR sniffs.I have fixed the problem in CVS, so you can update and keep going. Greg