[wp-trac] [WordPress Trac] #26429: Introduce .editorconfig to WordPress
WordPress Trac
noreply at wordpress.org
Mon Feb 3 22:44:27 UTC 2014
#26429: Introduce .editorconfig to WordPress
------------------------------+------------------------------
Reporter: netweb | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Build/Test Tools | Version: 3.8
Severity: normal | Resolution:
Keywords: | Focuses:
------------------------------+------------------------------
Comment (by nacin):
Replying to [comment:5 TobiasBg]:
> Yes, that's the type of the newline, and that's clear to me. But what's
the reason to have a newline at the end of the file (which is what
`insert_final_newline` does).
> I can imagine that it's just consistency (and that "Some programs have
problems processing the last line of a file if it is not newline-
terminated." in the Wikipedia article), but I'm wondering if there's
"real-life" advantages for having it.
cat/tail a file without a newline and you'll end up with no \n between the
output and your prompt. It also makes patches more verbose, as the default
is to assume that there *is* a new line, so it has to add a special
comment to the bottom of the file saying that a new line is *not* there.
Consistency is needed here to help keep patches less noisy (a lot of them
accidentally add/remove this line), and \n at the end of files are far
more common and accepted.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/26429#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list