FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=17258&edit=1

ID: 17258
Comment by: yves.heitz@elao.com
Reported By: yves dot heitz at elao dot com
Summary: Generic standard not returned by
PHP_CodeSniffer::getInstalledStandards(true)
Status: Open
Type: Bug
Package: PHP_CodeSniffer
Operating System: Mac OS X 10.6
Package Version: SVN
PHP Version: 5.3.0
Roadmap Versions:
New Comment:

Function getInstalledStandards check for a valid ruleset.xml in
standard folder. "Generic" standard has no ruleset, so it was skip.
(see CodeSniffer.php@1563)

sry for my frenchy english :-)


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

[2010-03-24 12:29:03] hyvs

Description:
------------
I would retrieve all default installed standards including 'generic'.
I use PHP_CodeSniffer::getInstalledStandards(true).

Test script:
---------------
$installedStandards = PHP_CodeSniffer::getInstalledStandards(true);
print_r($installedStandards);

Expected result:
----------------
Array
(
[0] => Generic
[1] => MySource
[2] => PEAR
[3] => PHPCS
[4] => Squiz
[5] => Zend
)

Actual result:
--------------
Array
(
[0] => MySource
[1] => PEAR
[2] => PHPCS
[3] => Squiz
[4] => Zend
)

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

Search Discussions

  • Gsherwood at Mar 29, 2010 at 4:06 am
    Edit report at http://pear.php.net/bugs/bug.php?id=17258&edit=1

    ID: 17258
    Updated by: gsherwood@squiz.net
    Reported By: yves dot heitz at elao dot com
    Summary: Generic standard not returned by
    PHP_CodeSniffer::getInstalledStandards(true)
    -Status: Open
    +Status: Bogus
    Type: Bug
    Package: PHP_CodeSniffer
    Operating System: Mac OS X 10.6
    Package Version: SVN
    PHP Version: 5.3.0
    -Assigned To:
    +Assigned To: squiz
    Roadmap Versions:
    New Comment:

    -Status: Open
    +Status: Bogus
    -Assigned To:
    +Assigned To: squiz
    This is by design. That feature is supposed to list the usable
    standards, but Generic is
    not usable because it has conflicting sniffs. You can always assume
    "Generic" is
    installed because ti comes with PHP_CodeSniffer.


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

    [2010-03-24 12:36:05] hyvs

    Function getInstalledStandards check for a valid ruleset.xml in
    standard folder. "Generic" standard has no ruleset, so it was skip.
    (see CodeSniffer.php@1563)

    sry for my frenchy english :-)

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

    [2010-03-24 12:29:03] hyvs

    Description:
    ------------
    I would retrieve all default installed standards including 'generic'.
    I use PHP_CodeSniffer::getInstalledStandards(true).

    Test script:
    ---------------
    $installedStandards = PHP_CodeSniffer::getInstalledStandards(true);
    print_r($installedStandards);

    Expected result:
    ----------------
    Array
    (
    [0] => Generic
    [1] => MySource
    [2] => PEAR
    [3] => PHPCS
    [4] => Squiz
    [5] => Zend
    )

    Actual result:
    --------------
    Array
    (
    [0] => MySource
    [1] => PEAR
    [2] => PHPCS
    [3] => Squiz
    [4] => Zend
    )

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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedMar 24, '10 at 11:40a
activeMar 29, '10 at 4:06a
posts2
users2
websitepear.php.net

2 users in discussion

Yves Heitz: 1 post Gsherwood: 1 post

People

Translate

site design / logo © 2022 Grokbase