Originally created by: Daniel...@gmail.com
Example code:
<?php
/*
*/
$a = 1; // this is line 5, but the warning is for line 4
?>
Actual output is:
dani@dani-P55-UD3L:~/php/PHPCheckstyle/PhpCheckstyle$ php run.php --src test.php --format console
test.php WARNING Line:4 - Undeclared or unused variable : '$a'.
Expected output:
test.php WARNING Line:5 - Undeclared or unused variable : '$a'.
I use geany. If I set line endings to CR/LF(Windows), than I get correct output "Line:5". If I set line endings to LF(Unix), I get wrong "Line:4"
Version info:
dani@dani-P55-UD3L:~/php/PHPCheckstyle/PhpCheckstyle$ svn info | grep Revision
Revision: 96
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: tch...@hotmail.com
(No comment was entered for this change.)
Status: Accepted
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: tch...@hotmail.com
Thanks for your report.
In the case of a new line inside a commetn I was relying on the PHP_EOL constant. I didn't though of the case of a PHP file with line endings different that the default value for the current system.
I have commited a patch on the trunk, can you have a look and tell me if it works for you ?
Thanks a lot.
Status: Fixed
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: Daniel...@gmail.com
Yes fixed, line numbers are now correct in my multi-thousand line files, thanks.