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

Request #14953 output into file
Submitted: 2008-11-04 10:36 UTC
From: mosonyi Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.1.0)
PHP Version: 5.2.6 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 : 6 + 25 = ?

 
 [2008-11-04 10:36 UTC] mosonyi (Zoltan Mosonyi)
Description: ------------ It would be nice if the output can be write into file. Ex: phpcs --destfile=checkstyle_errors.xml

Comments

 [2008-11-04 10:43 UTC] squiz (Greg Sherwood)
PHP_CodeSniffer sends output to standard out, so you can just redirect standard output to where ever you want, like this: phpcs /path/to/file.php > checkstyle_errors.xml I don't think PHP_CodeSniffer needs a feature to specifically do this. Is the alternative I have provided good enough to do what you are after or is there something else you need to do?
 [2008-11-04 10:56 UTC] mosonyi (Zoltan Mosonyi)
Yes I know about this, but I want to use the phing's codesniffer task as my build system is based on phing. If there is no possibility to do that phing will not provide this option either.:( I need the report files as xml (to parse them automatically with an other system). So I had to rewrite your and phing's classes to be able to redirect the output to a file. (It is not so nice)
 [2008-12-11 02:22 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.