naitsirch commented on issue #4641:
URL: https://github.com/apache/netbeans/issues/4641#issuecomment-1275854128

   @Eugene-Melbourne your quote was incomplete. PSR-12 says
   > All PHP files MUST end with a non-blank line, terminated with a single LF.
   
   So there must **not** be a blank line at the end of the file, but the last 
line has to be terminated with a LF.
   
   In fact this is a linux convention followed by common text editors. In Linux 
the LF character is not regarded as a line seperator, but as a line 
**terminator**, where valid lines should end with LF. You can read more about 
that distinction on 
[wikipedia](https://en.wikipedia.org/wiki/Newline#Interpretation).
   
   If you create an empty file on Linux in Netbeans, insert some characters 
(without pressing return key) and save, it won't add the line terminator LF. 
But this should be done on linux text files (see [here][1] or [there][2]).
   
   The current behaviour leads to issues when you are using tools like `cat`. 
Here's an example:
   
       naitsirch@linux1:~$ cat file_created_by_netbeans.txt
       testnaitsirch@linux1:~$
   
   It would be nice if this could be changed for all text file types if the 
`Unix(LF)` formatting is used.
   
   [1]: https://superuser.com/a/745135/248359
   [2]: https://vi.stackexchange.com/a/11630


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to