Skip to content
ᴀɴᴛᴏɴ ɴᴏᴠᴏᴊɪʟᴏᴠ edited this page Jun 23, 2024 · 4 revisions

Description

Checks all spec data for empty lines at the end.

Problematic code

%changelog
* Wed Jan 24 2018 Anton Novojilov <[email protected]> - 1.0.0-0↵
- Test changelog %record↵
%changelog
* Wed Jan 24 2018 Anton Novojilov <[email protected]> - 1.0.0-0↵
- Test changelog %record↵
↵
↵

Correct code

%changelog
* Wed Jan 24 2018 Anton Novojilov <[email protected]> - 1.0.0-0↵
- Test changelog %record↵

Rationale

Answer from StackExchange:

diff programs (like used by git diff, github etc.) show line by line differences between files. They usually print a message when only one file ends with a newline because else you would not see this difference. For example, if the only difference between two files is the presence of the last newline character, without the hint it would look like the both files were the same, when diff and cmp return an exit-code unequal success and the checksums of the files (e.g. via md5sum) don't match.

Clone this wiki locally