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

Bug #20139 No report file generated on success
Submitted: 2013-12-03 12:31 UTC
From: danielek Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.5.0)
PHP Version: Irrelevant OS: Linux
Roadmaps: (Not assigned)    
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 : 12 + 19 = ?

 
 [2013-12-03 12:31 UTC] danielek (Daniel Jakistam)
Description: ------------ Not sure if that was intentional, but as of 1.5.0 no file is generated when we run phpcs with --report-file option and no errors are found in the checked files. Seems it's caused by line in Reporting.php 138 if ($generatedReport !== '') { Due to this, the file is never saved, because there is apparently nothing to save. It's important though to have that empty file, otherwise e.g. Jenkins have some small problems if it can't find it. Prior to 1.5.0 (e.g. 1.4.8) running phpcs --report=checkstyle --report-file=checkstyle.xml always created that file (and that was similar to other cli tools like phpmd etc. which also create such "empty" files). If that was intentional, any chance to get it back through an option or something?

Comments

 [2013-12-04 09:05 UTC] squiz (Greg Sherwood)
-Status: Open +Status: Closed -Assigned To: +Assigned To: squiz
Yes, it was intentional, but I didn't realise that CI tools would have a problem with that. I've reinstated the empty file in this commit: https://github.com/squizlabs/PHP_CodeSniffer/commit/f08443ff6ce9388d55a3c447dc1 85345ce040f66 Will be released in 1.5.1, which will be out within 7 days. You can revert to the stable 1.4.8, manually patch, or install directly from Github to get the fix.
 [2013-12-04 09:05 UTC] squiz (Greg Sherwood)
Yes, it was intentional, but I didn't realise that CI tools would have a problem with that. I've reinstated the empty file in this commit: https://github.com/squizlabs/PHP_CodeSniffer/commit/f08443ff6ce9388d55a3c447dc1 85345ce040f66 Will be released in 1.5.1, which will be out within 7 days. You can revert to the stable 1.4.8, manually patch, or install directly from Github to get the fix.