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

Bug #20139 No report file generated on success
Submitted: 2013-12-03 07:31 UTC Modified: 2013-12-04 04:05 UTC
From: danielek Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.5.0)
PHP Version: Irrelevant OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2013-12-03 07: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 04: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 04: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.