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

Bug #13254 Notices output in checkstyle report causes XML issues
Submitted: 2008-02-28 17:35 UTC
From: dstockto Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.0.1)
PHP Version: 5.2.5 OS: Mac OSX 10.5
Roadmaps: 1.1.0    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 10 + 24 = ?

 
 [2008-02-28 17:35 UTC] dstockto (David Stockton)
Description: ------------ phpcs overrides the error_reporting directive in the php.ini. As such it is outputting notices in the checkstyle.xml file which cause issues when trying to import this file into php_under_control. I can get correct output by excluding notices from being output in the phpcs script, but this is probably not the ideal way to fix this issue. Thanks, David Test script: --------------- phpcs --report=checkstyle --standard=PEAR . Expected result: ---------------- No notices should be output into the xml. Actual result: -------------- PHP Notice: Uninitialized string offset: 0 in /Users/davidstockton/Projects/PEAR/PEAR/PHP/CodeSniffer/Standards/PEAR/Sniffs/NamingConventions/ValidClassNameSniff.php on line 91 Notice: Uninitialized string offset: 0 in /Users/davidstockton/Projects/PEAR/PEAR/PHP/CodeSniffer/Standards/PEAR/Sniffs/NamingConventions/ValidClassNameSniff.php on line 91

Comments

 [2008-02-28 18:03 UTC] dstockto (David Stockton)
I've narrowed it down. We have a utility class named "___". I am pretty sure that is causing the notices.
 [2008-02-28 21:55 UTC] squiz (Greg Sherwood)
Yes, this code causes that error: class ___ {} (I'm not going to ask :) I've decided not to hide notices because if PHP_CodeSniffer is breaking with some code it is important I find it and fix it. I'll fix the root cause of this error.
 [2008-02-28 22:01 UTC] squiz (Greg Sherwood)
This bug has been fixed in CVS. 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.