#12967 closed enhancement (fixed)
"port lint" should check for missing newline at end of file
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | MacPorts 1.6 |
Component: | base | Version: | 1.6.0 |
Keywords: | Cc: | ryandesign (Ryan Carsten Schmidt) | |
Port: |
Description
Just like "port lint
" warns about whitespace at the end of a line which should not be there, it should also warn about a missing newline at the end of the file (e.g. if the last byte of the file is not 0x0A). According to UNIX definitions, a text file is not a text file if it does not end in a newline. For this reason, many editors add a newline at the end of the file if one is not already there. (At least, some editors can be configured to do this.) For the benefit of those whose editors do not do this, "port lint
" should warn.
Change History (3)
comment:1 Changed 17 years ago by afb@…
comment:3 Changed 15 years ago by jmroot (Joshua Root)
Milestone: | MacPorts Future → MacPorts 1.6 |
---|
Note: See
TracTickets for help on using
tickets.
Tcl doesn't distinguish between EOF and EOL, but it can probably be hacked in... (like the UTF-8 checks)