You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A newline in a text file serves as a terminator, not a separator. This
means every line, including the last one, should end with a newline.
If a file is committed without a trailing newline, editors that do add
one will create an unnecessary diff when the file is later edited. These
spurious diffs can clutter reviews, making it harder to identify actual
changes, especially when many files are involved.
A newline at the end of the file also facilitates file concatenation.
Without it, the first line of the second file will merge with the last
line of the first file, creating a single line.
See https://stackoverflow.com/questions/729692/why-should-text-files-end-with-a-newline
0 commit comments