Skip to content

Commit eb3a58d

Browse files
JoePerchestorvalds
authored andcommitted
checkpatch: allow space leading blank lines in email headers
Allow a leading space and otherwise blank link in the email headers as it can be a line wrapped Spamassassin multiple line string or any other valid rfc 2822/5322 email header. The line with space causes checkpatch to erroneously think that it's in the content body, as opposed to headers and thus flag a mail header as an unwrapped long comment line. Link: http://lkml.kernel.org/r/d75a9f0b78b3488078429f4037d9fff3bdfa3b78.1490247180.git.joe@perches.com Signed-off-by: Joe Perches <joe@perches.com>Reported-by: Darren Hart (VMware) <dvhart@infradead.org> Tested-by: Darren Hart (VMware) <dvhart@infradead.org> Reviewed-by: Darren Hart (VMware) <dvhart@vmware.com> Original-patch-by: John 'Warthog9' Hawley (VMware) <warthog9@eaglescrag.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 4dbed76 commit eb3a58d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

scripts/checkpatch.pl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2628,8 +2628,8 @@ sub process {
26282628
# Check if it's the start of a commit log
26292629
# (not a header line and we haven't seen the patch filename)
26302630
if ($in_header_lines && $realfile =~ /^$/ &&
2631-
!($rawline =~ /^\s+\S/ ||
2632-
$rawline =~ /^(commit\b|from\b|[\w-]+:).*$/i)) {
2631+
!($rawline =~ /^\s+(?:\S|$)/ ||
2632+
$rawline =~ /^(?:commit\b|from\b|[\w-]+:)/i)) {
26332633
$in_header_lines = 0;
26342634
$in_commit_log = 1;
26352635
$has_commit_log = 1;

0 commit comments

Comments
 (0)