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

Request #17240 Get --report-file to accept relative paths
Submitted: 2010-03-18 01:21 UTC
From: ashnazg Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.2.2)
PHP Version: 5.2.4 OS: RHEL4
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 : 41 - 39 = ?

 
 [2010-03-18 01:21 UTC] ashnazg (Chuck Burgess)
Description: ------------ When using the --report-file option with a relative path, and the target file does not already exist, I get a file_put_contents() PHP Warning failure. If I use an absolute path, the file will be created successfully. If I use a relative path, I *must* create the file myself before running phpcs. Test script: --------------- Files: - relative/file1.php - relative/file2.php - relative/path/to/ Run from parent dir of relative/: phpcs --report-file=relative/path/to/checkstyle.xml --report=checkstyle --ignore=relative/path relative/ Expected result: ---------------- relative/path/to/checkstyle.xml file to be created Actual result: -------------- PHP Warning: file_put_contents(relative/path/to/checkstyle.xml): failed to open stream: No such file or directory in /absolute/path/to/PHP/CodeSniffer/Reporting.php on line 102 PHP Stack trace: PHP 1. {main}() /absolute/path/to/phpcs:0 PHP 2. PHP_CodeSniffer_CLI->process() /absolute/path/to/phpcs:30 PHP 3. PHP_CodeSniffer_CLI->printErrorReport() /absolute/path/to/PHP/CodeSniffer/CLI.php:438 PHP 4. PHP_CodeSniffer_Reporting->printReport() /absolute/path/to/PHP/CodeSniffer/CLI.php:475 PHP 5. file_put_contents() /absolute/path/to/PHP/CodeSniffer/Reporting.php:102

Comments

 [2010-03-19 08:01 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2011-04-07 11:56 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2011-04-20 10:21 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!