FAQ
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: Open
+Status: Feedback
Type: Bug
Package: PHP_CodeSniffer
Operating System: OSX 10.6
Package Version: 1.3.0a1
PHP Version: 5.3.3
-Assigned To:
+Assigned To: squiz
Roadmap Versions:
New Comment:

-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?


Previous Comments:
------------------------------------------------------------------------

[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.

------------------------------------------------------------------------

Search Discussions

  • Blueduck at Aug 27, 2010 at 7:24 am
    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.

    ------------------------------------------------------------------------
  • Gsherwood at Aug 27, 2010 at 9:52 am
    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.

    ------------------------------------------------------------------------

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedAug 26, '10 at 10:47p
activeAug 27, '10 at 9:52a
posts3
users2
websitepear.php.net

2 users in discussion

Gsherwood: 2 posts Blueduck: 1 post

People

Translate

site design / logo © 2022 Grokbase