Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1607222

[PATCH] checkpatch: Allow space leading blank lines in email headers

From Joe Perches <joe@perches.com>
Newsgroups linux.kernel
Subject [PATCH] checkpatch: Allow space leading blank lines in email headers
Date 2017-03-23 09:10 +0100
Message-ID <to5Fo-7vn-11@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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 erroniously think that it's
in the content body, as opposed to headers and thus flag a mail header
as an unwrapped long comment line.

Reported-by: Darren Hart (VMware) <dvhart@infradead.org>
Original-patch-by: John 'Warthog9' Hawley (VMware) <warthog9@eaglescrag.net>
Signed-off-by: Joe Perches <joe@perches.com>
---
 scripts/checkpatch.pl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 832e8150dba3..089c974aa3a5 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2628,8 +2628,8 @@ sub process {
 # Check if it's the start of a commit log
 # (not a header line and we haven't seen the patch filename)
 		if ($in_header_lines && $realfile =~ /^$/ &&
-		    !($rawline =~ /^\s+\S/ ||
-		      $rawline =~ /^(commit\b|from\b|[\w-]+:).*$/i)) {
+		    !($rawline =~ /^\s+(?:\S|$)/ ||
+		      $rawline =~ /^(?:commit\b|from\b|[\w-]+:)/i)) {
 			$in_header_lines = 0;
 			$in_commit_log = 1;
 			$has_commit_log = 1;
-- 
2.10.0.rc2.1.g053435c

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH] checkpatch: Allow space leading blank lines in email headers Joe Perches <joe@perches.com> - 2017-03-23 09:10 +0100

csiph-web