Bug #17824 [Fbk->Bgs]: --sniff do not work with all sniffs
| From: | gsherwood at squiz dot net | Date: | Fri, 27 Aug 2010 09:52:18 +0000 |
| Subject: | Bug #17824 [Fbk->Bgs]: --sniff do not work with all sniffs | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-4698@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: gsherwood@squiz.net
Reported By: blueduck at gmx dot net
Summary: --sniff do not work with all sniffs
-Status: Feedback
+Status: Bogus
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:
-Status: Feedback
+Status: Bogus
Thanks for the feedback. Glad it is now working. I will take a look at
the docs when I next update them to make sure this is clear.
Previous Comments:
------------------------------------------------------------------------
[2010-08-27 07:24:01] konafets
Yes, this is working for me.
Maybe you should put an example of this usage into the documentation. So
its clear for everybody.
------------------------------------------------------------------------
[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