Re: [PATCH] checkpatch: warn about hunks which only add blank lines
Thomas Huth <[email protected]>
| Newsgroups | gmane.comp.emulators.qemu |
|---|---|
| Message-ID | <[email protected]> |
On 31/07/2026 15.40, Denis V. Lunev wrote: > Patches sometimes carry a hunk whose entire content is one or two > added blank lines. It changes nothing, it makes the diff longer and > it survives review because nobody looks twice at a blank line. The > blank line itself is perfectly fine, the gratuitous hunk is not. Well, I wouldn't say that the blank line itself is fine. It depends. In source code, there normally should not be more than one empty line between code blocks, that's why I complained to the patch in your pull request. Anyway, thanks for tackling this! But looking at the checkpatch.pl script in the Linux kernel, they added a slightly different check in the course of time: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=365dd4eaafa22d2c79913d5f057d636e8842c470 Maybe we should adapt that one, to avoid that the scripts diverge even further? Thomas