diff options
| author | Joe Perches <joe@perches.com> | 2017-05-08 18:55:42 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-05-08 20:15:11 -0400 |
| commit | eb3a58de3ec4940fc6b2a9f810895d772a2a9794 (patch) | |
| tree | 9d0197fc4f491961218fc66c3cbc3ffb6fa66d47 | |
| parent | 4dbed76f2429516b9519620dacdda6c750640e8d (diff) | |
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>
| -rwxr-xr-x | scripts/checkpatch.pl | 4 |
1 files 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 { | |||
| 2628 | # Check if it's the start of a commit log | 2628 | # Check if it's the start of a commit log |
| 2629 | # (not a header line and we haven't seen the patch filename) | 2629 | # (not a header line and we haven't seen the patch filename) |
| 2630 | if ($in_header_lines && $realfile =~ /^$/ && | 2630 | if ($in_header_lines && $realfile =~ /^$/ && |
| 2631 | !($rawline =~ /^\s+\S/ || | 2631 | !($rawline =~ /^\s+(?:\S|$)/ || |
| 2632 | $rawline =~ /^(commit\b|from\b|[\w-]+:).*$/i)) { | 2632 | $rawline =~ /^(?:commit\b|from\b|[\w-]+:)/i)) { |
| 2633 | $in_header_lines = 0; | 2633 | $in_header_lines = 0; |
| 2634 | $in_commit_log = 1; | 2634 | $in_commit_log = 1; |
| 2635 | $has_commit_log = 1; | 2635 | $has_commit_log = 1; |
