Edit report at https://pear.php.net/bugs/bug.php?id=19545&edit=1

ID: 19545
Updated by: gsherwood@squiz.net
Reported By: kthari85@gmail.com
Summary: Line Feed
-Status: Open
+Status: Feedback
Type: Bug
Package: PHP_CodeSniffer
Operating System: Ubuntu
Package Version: SVN
PHP Version: 5.4.4
-Assigned To:
+Assigned To: squiz
Roadmap Versions:
New Comment:

-Status: Open
+Status: Feedback
-Assigned To:
+Assigned To: squiz
Hi Hari. I'm not 100% sure what you're asking, but I can tell you the
different types
of newline characters are:
Unix: \n
Windows: \r\n
OS X: \r

Nothing will obviously come after the newline character on a line of
code, and the
content before it is ignored, so the content of the line shouldn't have
anything to do
with the newline character or reported errors.

You don't mention what errors you get when checking the file you linked,
but they
would look something like:

End of line character is invalid; expected "\n" but found "\r\n"

That example message says that the sniff requires unix line ending but
windows line endings.

You'd set this in your text editor, although I've never used Netbeans,
so have no idea
how you'd do that or what that Unix Line Feed plugin is. But I can tell
you that line
endings are consistent for the entire file, so if it is already using
Windows newlines, it
will continue to use them until you tell you editor to convert the
entire file to unix
newlines and re-save the file.

Previous Comments:

[2012-08-04 17:45:29] #79beda22bddd2fed31d

Hi Greg ,

I am not sure, so this is a question

All PHP files MUST use the Unix LF (linefeed) line ending.

What is unix line feed ending ?

1 ) Is it just a enter after closing }

2 ) enter after closing brace ( } ) and a space ?

If its case 1 : I am wondering whether its a bug in phpcs for I am from

Linux system and after keeping a enter the phpcs reports error and if I

kept a space its not .

I am using Netbeans and I did installed Unix Line Feed plugin to check
whether I am doing something wrong . Let me know thanks

Adding something more , please move to github issue tracker . This is
horrible :)

Thank you

Hari K T

Test script:

Expected result:
Should be successful


Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
postedAug 6, '12 at 12:41a
activeAug 6, '12 at 12:41a

1 user in discussion

Gsherwood: 1 post



site design / logo © 2022 Grokbase