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

ID: 18200
Updated by: gsherwood@squiz.net
Reported By: spam at endstadium dot com
Summary: Calling standard does now fail
Status: Open
Type: Bug
Package: PHP_CodeSniffer
Package Version: 1.3.0RC2
PHP Version: 5.3.1
Roadmap Versions:
New Comment:

Caused by fix for bug #18145


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

[2011-01-17 18:58:25] seikilos

Description:
------------
I am using a script to invoke phpcs, this is the command line that
worked untill I upgraded to RC2

call="php -d memory_limit=512M -d include_path=\".:/usr/share/php/\"
/usr/bin/phpcs -s --standard="$p/tools/codesniffer.xml" --report=xml
--report-file=/tmp/phpcs.xml $p"

However this does now fail with a weird error (see Actual result)
Please note I am passing a standard via
--standard=/opt/buildbot-slave/Preconfig/build/tools/codesniffer.xml

And the error message tells me:
Ruleset /opt/buildbot-slave/Preconfig/build/tools/ruleset.xml is not
valid in /usr/share/php/PHP/CodeSniffer.php on line 611

For sure there is no ruleset.xml since I did explicitly passed
codesniffer.xml and not ruleset.xml

Actual result:
--------------
php -d memory_limit=512M -d include_path=".:/usr/share/php/"
/usr/bin/phpcs -s
--standard=/opt/buildbot-slave/Preconfig/build/tools/codesniffer.xml
--report=xml --report-file=/tmp/phpcs.xml
/opt/buildbot-slave/Preconfig/build

Warning: simplexml_load_file(): I/O warning : failed to load external
entity "/opt/buildbot-slave/Preconfig/build/tools/ruleset.xml" in
/usr/share/php/PHP/CodeSniffer.php on line 712

Fatal error: Uncaught PHP_CodeSniffer_Exception: Ruleset
/opt/buildbot-slave/Preconfig/build/tools/ruleset.xml is not valid in
/usr/share/php/PHP/CodeSniffer.php on line 611
#0 /usr/share/php/PHP/CodeSniffer.php(611):
PHP_CodeSniffer->getSniffFiles('/opt/buildbot-s...', 'Develo...')
#1 /usr/share/php/PHP/CodeSniffer.php(446):
PHP_CodeSniffer->setTokenListeners('/opt/buildbot-s...', Array)
#2 /usr/share/php/PHP/CodeSniffer/CLI.php(542):
PHP_CodeSniffer->process(Array, '/opt/buildbot-s...', Array, false)
#3 /usr/bin/phpcs(38): PHP_CodeSniffer_CLI->process()
#4 {main}
thrown in /usr/share/php/PHP/CodeSniffer.php on line 714

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

Search Discussions

  • Gsherwood at Jan 17, 2011 at 10:56 pm
    Edit report at http://pear.php.net/bugs/bug.php?id=18200&edit=1

    ID: 18200
    Updated by: gsherwood@squiz.net
    Reported By: spam at endstadium dot com
    -Summary: Calling standard does now fail
    +Summary: Using custom named ruleset file as standard no longer
    works
    -Status: Open
    +Status: Closed
    Type: Bug
    Package: PHP_CodeSniffer
    Package Version: 1.3.0RC2
    PHP Version: 5.3.1
    -Assigned To:
    +Assigned To: squiz
    Roadmap Versions:
    New Comment:

    -Summary: Calling standard does now fail
    +Summary: Using custom named ruleset file as standard
    no longer works
    -Status: Open
    +Status: Closed
    -Assigned To:
    +Assigned To: squiz
    This bug has been fixed in SVN.

    If this was a documentation problem, the fix will appear on pear.php.net
    by the end of next Sunday (CET).

    If this was a problem with the pear.php.net website, the change should
    be live shortly.

    Otherwise, the fix will appear in the package's next release.

    Thank you for the report and for helping us make PEAR better.




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

    [2011-01-17 23:46:51] squiz

    Caused by fix for bug #18145

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

    [2011-01-17 18:58:25] seikilos

    Description:
    ------------
    I am using a script to invoke phpcs, this is the command line that
    worked untill I upgraded to RC2

    call="php -d memory_limit=512M -d include_path=\".:/usr/share/php/\"
    /usr/bin/phpcs -s --standard="$p/tools/codesniffer.xml" --report=xml
    --report-file=/tmp/phpcs.xml $p"

    However this does now fail with a weird error (see Actual result)
    Please note I am passing a standard via
    --standard=/opt/buildbot-slave/Preconfig/build/tools/codesniffer.xml

    And the error message tells me:
    Ruleset /opt/buildbot-slave/Preconfig/build/tools/ruleset.xml is not
    valid in /usr/share/php/PHP/CodeSniffer.php on line 611

    For sure there is no ruleset.xml since I did explicitly passed
    codesniffer.xml and not ruleset.xml

    Actual result:
    --------------
    php -d memory_limit=512M -d include_path=".:/usr/share/php/"
    /usr/bin/phpcs -s
    --standard=/opt/buildbot-slave/Preconfig/build/tools/codesniffer.xml
    --report=xml --report-file=/tmp/phpcs.xml
    /opt/buildbot-slave/Preconfig/build

    Warning: simplexml_load_file(): I/O warning : failed to load external
    entity "/opt/buildbot-slave/Preconfig/build/tools/ruleset.xml" in
    /usr/share/php/PHP/CodeSniffer.php on line 712

    Fatal error: Uncaught PHP_CodeSniffer_Exception: Ruleset
    /opt/buildbot-slave/Preconfig/build/tools/ruleset.xml is not valid in
    /usr/share/php/PHP/CodeSniffer.php on line 611
    #0 /usr/share/php/PHP/CodeSniffer.php(611):
    PHP_CodeSniffer->getSniffFiles('/opt/buildbot-s...', 'Develo...')
    #1 /usr/share/php/PHP/CodeSniffer.php(446):
    PHP_CodeSniffer->setTokenListeners('/opt/buildbot-s...', Array)
    #2 /usr/share/php/PHP/CodeSniffer/CLI.php(542):
    PHP_CodeSniffer->process(Array, '/opt/buildbot-s...', Array, false)
    #3 /usr/bin/phpcs(38): PHP_CodeSniffer_CLI->process()
    #4 {main}
    thrown in /usr/share/php/PHP/CodeSniffer.php on line 714

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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedJan 17, '11 at 10:44p
activeJan 17, '11 at 10:56p
posts2
users1
websitepear.php.net

1 user in discussion

Gsherwood: 2 posts

People

Translate

site design / logo © 2022 Grokbase