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

ID: 19095
Updated by: m.breedveld@coolblue.nl
Reported By: m dot breedveld at coolblue dot nl
Summary: External standard does not work
Status: Open
Type: Bug
Package: PHP_CodeSniffer
Operating System: Windows 7
-Package Version: 1.3.2
+Package Version: 1.3.1
PHP Version: 5.3.8
Roadmap Versions:
New Comment:

-Package Version: 1.3.2
+Package Version: 1.3.1
Package Version is not 1.3.2 but it's 1.3.1 sorry my bad.


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

[2011-12-01 13:06:19] michaelb

Description:
------------
Loading external standard does not work.

I'm trying to load an self made standard which is outside the
PHP_CodeSniffer's Standards directory discribed on
http://pear.php.net/manual/en/package.php.php-codesniffer.usage.php

But this does not work, when i load de standard like this.
(see test script)

The MyStandard dir has an valid ruleset.xml ( i think because it works
when it is inside the PHP_CodeSniffer's Standards directory)

Am i missing something or is this a bug?



Test script:
---------------
// Does not work
phpcs --standard=C:\\MyStandard pathtofile

phpcs --standard=C:\MyStandard pathtofile

phpcs --standard=C://MyStandard pathtofile

// Does work when i put MyStandard dir in the
// PHP_CodeSniffer's Standards directory

phpcs --standard=MyStandard pathtofie


Ruleset.xml :

<?xml version="1.0"?>
<ruleset name="MyStandard">
<description>The MyStandard coding standard.</description>

<!-- Function Sniffs -->
<rule ref="Generic.Functions.FunctionCallArgumentSpacing"/>
<!-- //Function Sniffs -->

<!-- Formatting Sniffs -->
<rule ref="Generic.Formatting.NoSpaceAfterCast"/>
<!-- //Formatting Sniffs -->

<!-- PHP Sniffs -->
<rule ref="Generic.PHP.LowerCaseConstant"/>
<rule ref="Generic.PHP.DisallowShortOpenTag"/>
<rule ref="Generic.PHP.ForbiddenFunctions"/>
<!-- //PHP Sniffs -->

<!-- FILES SNIFFS -->

<!-- Lines can be 150 chars long, show errors at 150 chars -->
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="150"/>
<property name="absoluteLineLimit" value="150"/>
</properties>
</rule>

<!-- Use Windows newlines -->
<rule ref="Generic.Files.LineEndings">
<properties>
<property name="eolChar" value="\r\n"/>
</properties>
</rule>

<!-- //FILES SNIFFS -->

<!-- NAMINGCONVENTIONS SNIFFS -->
<rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
<rule ref="Generic.NamingConventions.ConstructorName"/>
<!-- //NAMINGCONVENTIONS SNIFFS -->

</ruleset>


Expected result:
----------------
Error report.

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

Search Discussions

  • Gsherwood at Dec 1, 2011 at 10:30 pm
    Edit report at https://pear.php.net/bugs/bug.php?id=19095&edit=1

    ID: 19095
    Updated by: gsherwood@squiz.net
    Reported By: m dot breedveld at coolblue dot nl
    Summary: External standard does not work
    -Status: Open
    +Status: Duplicate
    Type: Bug
    Package: PHP_CodeSniffer
    Operating System: Windows 7
    Package Version: 1.3.1
    PHP Version: 5.3.8
    -Assigned To:
    +Assigned To: squiz
    Roadmap Versions:
    New Comment:

    -Status: Open
    +Status: Duplicate
    -Assigned To:
    +Assigned To: squiz
    Seems to be submitted twice. Issue with test script is bug #19096


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

    [2011-12-01 15:31:57] michaelb

    -Package Version: 1.3.2
    +Package Version: 1.3.1
    Package Version is not 1.3.2 but it's 1.3.1 sorry my bad.

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

    [2011-12-01 13:06:19] michaelb

    Description:
    ------------
    Loading external standard does not work.

    I'm trying to load an self made standard which is outside the
    PHP_CodeSniffer's Standards directory discribed on
    http://pear.php.net/manual/en/package.php.php-codesniffer.usage.php

    But this does not work, when i load de standard like this.
    (see test script)

    The MyStandard dir has an valid ruleset.xml ( i think because it works
    when it is inside the PHP_CodeSniffer's Standards directory)

    Am i missing something or is this a bug?



    Test script:
    ---------------
    // Does not work
    phpcs --standard=C:\\MyStandard pathtofile

    phpcs --standard=C:\MyStandard pathtofile

    phpcs --standard=C://MyStandard pathtofile

    // Does work when i put MyStandard dir in the
    // PHP_CodeSniffer's Standards directory

    phpcs --standard=MyStandard pathtofie


    Ruleset.xml :

    <?xml version="1.0"?>
    <ruleset name="MyStandard">
    <description>The MyStandard coding standard.</description>

    <!-- Function Sniffs -->
    <rule ref="Generic.Functions.FunctionCallArgumentSpacing"/>
    <!-- //Function Sniffs -->

    <!-- Formatting Sniffs -->
    <rule ref="Generic.Formatting.NoSpaceAfterCast"/>
    <!-- //Formatting Sniffs -->

    <!-- PHP Sniffs -->
    <rule ref="Generic.PHP.LowerCaseConstant"/>
    <rule ref="Generic.PHP.DisallowShortOpenTag"/>
    <rule ref="Generic.PHP.ForbiddenFunctions"/>
    <!-- //PHP Sniffs -->

    <!-- FILES SNIFFS -->

    <!-- Lines can be 150 chars long, show errors at 150 chars -->
    <rule ref="Generic.Files.LineLength">
    <properties>
    <property name="lineLimit" value="150"/>
    <property name="absoluteLineLimit" value="150"/>
    </properties>
    </rule>

    <!-- Use Windows newlines -->
    <rule ref="Generic.Files.LineEndings">
    <properties>
    <property name="eolChar" value="\r\n"/>
    </properties>
    </rule>

    <!-- //FILES SNIFFS -->

    <!-- NAMINGCONVENTIONS SNIFFS -->
    <rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
    <rule ref="Generic.NamingConventions.ConstructorName"/>
    <!-- //NAMINGCONVENTIONS SNIFFS -->

    </ruleset>


    Expected result:
    ----------------
    Error report.

    ------------------------------------------------------------------------
  • M Breedveld at Dec 2, 2011 at 3:18 pm
    Edit report at https://pear.php.net/bugs/bug.php?id=19095&edit=1

    ID: 19095
    Updated by: m.breedveld@coolblue.nl
    Reported By: m dot breedveld at coolblue dot nl
    Summary: External standard does not work
    Status: Duplicate
    Type: Bug
    Package: PHP_CodeSniffer
    Operating System: Windows 7
    Package Version: 1.3.1
    PHP Version: 5.3.8
    Assigned To: squiz
    Roadmap Versions:
    New Comment:

    I cannot see the bug #19096.

    ERROR:â– The user who submitted this bug has not yet confirmed their
    email address.


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

    [2011-12-01 23:29:58] squiz

    -Status: Open
    +Status: Duplicate
    -Assigned To:
    +Assigned To: squiz
    Seems to be submitted twice. Issue with test script is bug #19096

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

    [2011-12-01 15:31:57] michaelb

    -Package Version: 1.3.2
    +Package Version: 1.3.1
    Package Version is not 1.3.2 but it's 1.3.1 sorry my bad.

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

    [2011-12-01 13:06:19] michaelb

    Description:
    ------------
    Loading external standard does not work.

    I'm trying to load an self made standard which is outside the
    PHP_CodeSniffer's Standards directory discribed on
    http://pear.php.net/manual/en/package.php.php-codesniffer.usage.php

    But this does not work, when i load de standard like this.
    (see test script)

    The MyStandard dir has an valid ruleset.xml ( i think because it works
    when it is inside the PHP_CodeSniffer's Standards directory)

    Am i missing something or is this a bug?



    Test script:
    ---------------
    // Does not work
    phpcs --standard=C:\\MyStandard pathtofile

    phpcs --standard=C:\MyStandard pathtofile

    phpcs --standard=C://MyStandard pathtofile

    // Does work when i put MyStandard dir in the
    // PHP_CodeSniffer's Standards directory

    phpcs --standard=MyStandard pathtofie


    Ruleset.xml :

    <?xml version="1.0"?>
    <ruleset name="MyStandard">
    <description>The MyStandard coding standard.</description>

    <!-- Function Sniffs -->
    <rule ref="Generic.Functions.FunctionCallArgumentSpacing"/>
    <!-- //Function Sniffs -->

    <!-- Formatting Sniffs -->
    <rule ref="Generic.Formatting.NoSpaceAfterCast"/>
    <!-- //Formatting Sniffs -->

    <!-- PHP Sniffs -->
    <rule ref="Generic.PHP.LowerCaseConstant"/>
    <rule ref="Generic.PHP.DisallowShortOpenTag"/>
    <rule ref="Generic.PHP.ForbiddenFunctions"/>
    <!-- //PHP Sniffs -->

    <!-- FILES SNIFFS -->

    <!-- Lines can be 150 chars long, show errors at 150 chars -->
    <rule ref="Generic.Files.LineLength">
    <properties>
    <property name="lineLimit" value="150"/>
    <property name="absoluteLineLimit" value="150"/>
    </properties>
    </rule>

    <!-- Use Windows newlines -->
    <rule ref="Generic.Files.LineEndings">
    <properties>
    <property name="eolChar" value="\r\n"/>
    </properties>
    </rule>

    <!-- //FILES SNIFFS -->

    <!-- NAMINGCONVENTIONS SNIFFS -->
    <rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
    <rule ref="Generic.NamingConventions.ConstructorName"/>
    <!-- //NAMINGCONVENTIONS SNIFFS -->

    </ruleset>


    Expected result:
    ----------------
    Error report.

    ------------------------------------------------------------------------
  • Gsherwood at Dec 4, 2011 at 10:01 pm
    Edit report at https://pear.php.net/bugs/bug.php?id=19095&edit=1

    ID: 19095
    Updated by: gsherwood@squiz.net
    Reported By: m dot breedveld at coolblue dot nl
    Summary: External standard does not work
    -Status: Duplicate
    +Status: Open
    Type: Bug
    Package: PHP_CodeSniffer
    Operating System: Windows 7
    Package Version: 1.3.1
    PHP Version: 5.3.8
    Assigned To: squiz
    Roadmap Versions:
    New Comment:

    -Status: Duplicate
    +Status: Open
    The other report had been deleted. I've re-opened this one.


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

    [2011-12-02 16:17:34] michaelb

    I cannot see the bug #19096.

    ERROR:?The user who submitted this bug has not yet confirmed their email
    address.

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

    [2011-12-01 23:29:58] squiz

    -Status: Open
    +Status: Duplicate
    -Assigned To:
    +Assigned To: squiz
    Seems to be submitted twice. Issue with test script is bug #19096

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

    [2011-12-01 15:31:57] michaelb

    -Package Version: 1.3.2
    +Package Version: 1.3.1
    Package Version is not 1.3.2 but it's 1.3.1 sorry my bad.

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

    [2011-12-01 13:06:19] michaelb

    Description:
    ------------
    Loading external standard does not work.

    I'm trying to load an self made standard which is outside the
    PHP_CodeSniffer's Standards directory discribed on
    http://pear.php.net/manual/en/package.php.php-codesniffer.usage.php

    But this does not work, when i load de standard like this.
    (see test script)

    The MyStandard dir has an valid ruleset.xml ( i think because it works
    when it is inside the PHP_CodeSniffer's Standards directory)

    Am i missing something or is this a bug?



    Test script:
    ---------------
    // Does not work
    phpcs --standard=C:\\MyStandard pathtofile

    phpcs --standard=C:\MyStandard pathtofile

    phpcs --standard=C://MyStandard pathtofile

    // Does work when i put MyStandard dir in the
    // PHP_CodeSniffer's Standards directory

    phpcs --standard=MyStandard pathtofie


    Ruleset.xml :

    <?xml version="1.0"?>
    <ruleset name="MyStandard">
    <description>The MyStandard coding standard.</description>

    <!-- Function Sniffs -->
    <rule ref="Generic.Functions.FunctionCallArgumentSpacing"/>
    <!-- //Function Sniffs -->

    <!-- Formatting Sniffs -->
    <rule ref="Generic.Formatting.NoSpaceAfterCast"/>
    <!-- //Formatting Sniffs -->

    <!-- PHP Sniffs -->
    <rule ref="Generic.PHP.LowerCaseConstant"/>
    <rule ref="Generic.PHP.DisallowShortOpenTag"/>
    <rule ref="Generic.PHP.ForbiddenFunctions"/>
    <!-- //PHP Sniffs -->

    <!-- FILES SNIFFS -->

    <!-- Lines can be 150 chars long, show errors at 150 chars -->
    <rule ref="Generic.Files.LineLength">
    <properties>
    <property name="lineLimit" value="150"/>
    <property name="absoluteLineLimit" value="150"/>
    </properties>
    </rule>

    <!-- Use Windows newlines -->
    <rule ref="Generic.Files.LineEndings">
    <properties>
    <property name="eolChar" value="\r\n"/>
    </properties>
    </rule>

    <!-- //FILES SNIFFS -->

    <!-- NAMINGCONVENTIONS SNIFFS -->
    <rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
    <rule ref="Generic.NamingConventions.ConstructorName"/>
    <!-- //NAMINGCONVENTIONS SNIFFS -->

    </ruleset>


    Expected result:
    ----------------
    Error report.

    ------------------------------------------------------------------------
  • Gsherwood at Dec 4, 2011 at 10:01 pm
    Edit report at https://pear.php.net/bugs/bug.php?id=19095&edit=1

    ID: 19095
    Updated by: gsherwood@squiz.net
    Reported By: m dot breedveld at coolblue dot nl
    Summary: External standard does not work
    -Status: Assigned
    +Status: Feedback
    Type: Bug
    Package: PHP_CodeSniffer
    Operating System: Windows 7
    Package Version: 1.3.1
    PHP Version: 5.3.8
    Assigned To: squiz
    Roadmap Versions:
    New Comment:

    -Status: Assigned
    +Status: Feedback
    My comment from the other bug report was: Are you able to try with the
    new 1.3.2
    version please.


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

    [2011-12-04 23:00:40] squiz

    -Status: Duplicate
    +Status: Open
    The other report had been deleted. I've re-opened this one.

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

    [2011-12-02 16:17:34] michaelb

    I cannot see the bug #19096.

    ERROR:?The user who submitted this bug has not yet confirmed their email
    address.

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

    [2011-12-01 23:29:58] squiz

    -Status: Open
    +Status: Duplicate
    -Assigned To:
    +Assigned To: squiz
    Seems to be submitted twice. Issue with test script is bug #19096

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

    [2011-12-01 15:31:57] michaelb

    -Package Version: 1.3.2
    +Package Version: 1.3.1
    Package Version is not 1.3.2 but it's 1.3.1 sorry my bad.

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

    [2011-12-01 13:06:19] michaelb

    Description:
    ------------
    Loading external standard does not work.

    I'm trying to load an self made standard which is outside the
    PHP_CodeSniffer's Standards directory discribed on
    http://pear.php.net/manual/en/package.php.php-codesniffer.usage.php

    But this does not work, when i load de standard like this.
    (see test script)

    The MyStandard dir has an valid ruleset.xml ( i think because it works
    when it is inside the PHP_CodeSniffer's Standards directory)

    Am i missing something or is this a bug?



    Test script:
    ---------------
    // Does not work
    phpcs --standard=C:\\MyStandard pathtofile

    phpcs --standard=C:\MyStandard pathtofile

    phpcs --standard=C://MyStandard pathtofile

    // Does work when i put MyStandard dir in the
    // PHP_CodeSniffer's Standards directory

    phpcs --standard=MyStandard pathtofie


    Ruleset.xml :

    <?xml version="1.0"?>
    <ruleset name="MyStandard">
    <description>The MyStandard coding standard.</description>

    <!-- Function Sniffs -->
    <rule ref="Generic.Functions.FunctionCallArgumentSpacing"/>
    <!-- //Function Sniffs -->

    <!-- Formatting Sniffs -->
    <rule ref="Generic.Formatting.NoSpaceAfterCast"/>
    <!-- //Formatting Sniffs -->

    <!-- PHP Sniffs -->
    <rule ref="Generic.PHP.LowerCaseConstant"/>
    <rule ref="Generic.PHP.DisallowShortOpenTag"/>
    <rule ref="Generic.PHP.ForbiddenFunctions"/>
    <!-- //PHP Sniffs -->

    <!-- FILES SNIFFS -->

    <!-- Lines can be 150 chars long, show errors at 150 chars -->
    <rule ref="Generic.Files.LineLength">
    <properties>
    <property name="lineLimit" value="150"/>
    <property name="absoluteLineLimit" value="150"/>
    </properties>
    </rule>

    <!-- Use Windows newlines -->
    <rule ref="Generic.Files.LineEndings">
    <properties>
    <property name="eolChar" value="\r\n"/>
    </properties>
    </rule>

    <!-- //FILES SNIFFS -->

    <!-- NAMINGCONVENTIONS SNIFFS -->
    <rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
    <rule ref="Generic.NamingConventions.ConstructorName"/>
    <!-- //NAMINGCONVENTIONS SNIFFS -->

    </ruleset>


    Expected result:
    ----------------
    Error report.

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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedDec 1, '11 at 2:32p
activeDec 4, '11 at 10:01p
posts5
users2
websitepear.php.net

2 users in discussion

Gsherwood: 3 posts M Breedveld: 2 posts

People

Translate

site design / logo © 2021 Grokbase