Bug #17824 [Fbk]: --sniff do not work with all sniffs

From: Date: Fri, 27 Aug 2010 07:24:01 +0000
Subject: Bug #17824 [Fbk]: --sniff do not work with all sniffs
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-4697@lists.php.net to get a copy of this message
Edit report at http://pear.php.net/bugs/bug.php?id=17824&edit=1 ID: 17824 Updated by: blueduck@gmx.net Reported By: blueduck at gmx dot net Summary: --sniff do not work with all sniffs Status: Feedback Type: Bug Package: PHP_CodeSniffer Operating System: OSX 10.6 Package Version: 1.3.0a1 PHP Version: 5.3.3 Assigned To: squiz Roadmap Versions: New Comment: Yes, this is working for me. Maybe you should put an example of this usage into the documentation. So its clear for everybody. Previous Comments: ------------------------------------------------------------------------ [2010-08-26 22:47:41] squiz -Status: Open +Status: Feedback -Assigned To: +Assigned To: squiz The sniff you are specifying does not exist in the PEAR standard. If you want to run that sniff, you need to specify a standard that use it, like the Squiz standard. So run PHPCS like this: phpcs --standard=Squiz --sniffs=Squiz.WhiteSpace.SemicolonSpacing /path/to/code Does that work for you? ------------------------------------------------------------------------ [2010-08-26 14:55:14] konafets Description: ------------ According to the documentation I try to specify on single sniff like $ phpcs --sniffs=Generic.PHP.LowerCaseConstant,PEAR.WhiteSpace.ScopeIndent /path/to/code This example works, but if I try this with phpcs --sniffs=Squiz.WhiteSpace.SemicolonSpacing -v /path/to/code I got this output: Registering sniffs in PEAR standard... DONE (0 sniffs registered) ... Expected result: ---------------- I expect the codesniffer taking only this particular sniff into account. Actual result: -------------- The codesniffer don't found any sniff. ------------------------------------------------------------------------ -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=17824&edit=1

« previous php.pear.bugs (#4697) next »