Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 3.4.2

Bug #18200 Using custom named ruleset file as standard no longer works
Submitted: 2011-01-17 23:58 UTC
From: seikilos Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.3.0RC2)
PHP Version: 5.3.1 OS:
Roadmaps: (Not assigned)    
Subscription  


 [2011-01-17 23:58 UTC] seikilos (Samuel Nolastname)
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

Comments

 [2011-01-18 04:46 UTC] squiz (Greg Sherwood)
Caused by fix for bug #18145
 [2011-01-18 04:58 UTC] squiz (Greg Sherwood)
-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.