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

Bug #12832 Tab to space conversion does not work
Submitted: 2008-01-05 12:46 UTC
From: julian7 Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.0.0)
PHP Version: 5.2.5 OS:
Roadmaps: 1.0.1    
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 : 39 + 18 = ?

 
 [2008-01-05 12:46 UTC] julian7 (Balazs Nagy)
Description: ------------ Conversion from tabs to spaces before sniffs is documented in Advanced Usage manual. When I use the command shown in Example 55-5, I get this error: $ phpcs --tab-width=4 tmp/mainline/mvc/view.php ... 21 | ERROR | Line indented incorrectly; expected at least 4 spaces, found 0 ... The aforementioned line in unambiguous form: samu:~>>% head -21 tmp/mainline/mvc/view.php | tail -1 | sed l \t * Selected view$ * Selected view

Comments

 [2008-01-05 13:15 UTC] squiz (Greg Sherwood)
Can you please provide a sample file to reproduce the error. The lines surrounding an error, and the file structure, are generally the cause of a bug and not the line itself.
 [2008-01-05 13:43 UTC] julian7 (Balazs Nagy)
Here's one (please use uuencoded version for testing): <?php /** * Test file * * @author Balazs Nagy <js@iksz.hu> */ /** * Test class */ class TestClass { /** * Constructor */ function __construct() { // do something } } ?> begin 644 test.php M/#]P:'`*"B\J*@H@*B!497-T(&9I;&4*("H@"B`J($!A=71H;W(@0F%L87IS M($YA9WD@/&IS0&EK<WHN:'4^"B`J+PH*+RHJ"B`J(%1E<W0@8VQA<W,*("HO M"F-L87-S(%1E<W1#;&%S<PI["@DO*BH*"2`J($-O;G-T<G5C=&]R"@D@*B\* M"69U;F-T:6]N(%]?8V]N<W1R=6-T*"D@>PH)"2\O(&1O('-O;65T:&EN9PH) '?0I]"C\^"@`` ` end samu:~>>% phpcs --tab-width=4 test.php FILE: /usr/home/admin/js/test.php -------------------------------------------------------------------------------- FOUND 12 ERROR(S) AND 1 WARNING(S) AFFECTING 5 LINE(S) -------------------------------------------------------------------------------- 7 | WARNING | PHP version not specified 7 | ERROR | Missing @category tag in file comment 7 | ERROR | Missing @package tag in file comment 7 | ERROR | Missing @license tag in file comment 7 | ERROR | Missing @link tag in file comment 11 | ERROR | Missing @category tag in class comment 11 | ERROR | Missing @package tag in class comment 11 | ERROR | Missing @author tag in class comment 11 | ERROR | Missing @license tag in class comment 11 | ERROR | Missing @link tag in class comment 15 | ERROR | Line indented incorrectly; expected at least 4 spaces, found 0 16 | ERROR | Line indented incorrectly; expected at least 4 spaces, found 0 17 | ERROR | Opening function brace should be on a new line --------------------------------------------------------------------------------
 [2008-01-09 00:33 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.