diff options
| author | Gregory Bean <gbean@codeaurora.org> | 2011-03-03 13:46:41 -0800 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:57:36 -0700 |
| commit | 8ac754201b09a3ab6f79065d571e5c9e0a51cd12 (patch) | |
| tree | 30770379823d5acca78472ed5b485958f75899b5 /scripts/checkpatch.pl | |
| parent | 7461a98690fe9c31f5f25369cbfc95bc19838923 (diff) | |
Don't complain about MIME headers.
When patches contain extended character sets, patches will contain
MIME headers after the subject line, which should not be confused
for a too-long summary line.
Signed-off-by: Gregory Bean <gbean@codeaurora.org>
(cherry picked from commit 8e6b9d3790595198a34320f1c3f4504cd258fed1)
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Diffstat (limited to 'scripts/checkpatch.pl')
| -rwxr-xr-x | scripts/checkpatch.pl | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 9734862a2e8a..921f5dbfcd5e 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2247,14 +2247,21 @@ sub process { " characters\n" . $herecurr); } } elsif ($shorttext == CHECK_NEXT_SHORTTEXT) { - $shorttext = IN_SHORTTEXT; +# The Subject line doesn't have to be the last header in the patch. +# Avoid moving to the IN_SHORTTEXT state until clear of all headers. +# Per RFC5322, continuation lines must be folded, so any left-justified +# text which looks like a header is definitely a header. + if ($line!~/^[\x21-\x39\x3b-\x7e]+:/) { + $shorttext = IN_SHORTTEXT; # Check for Subject line followed by a blank line. - if (length($line) != 0) { - WARN("NONBLANK_AFTER_SUMMARY", - "non-blank line after summary " . - "line\n" . $sublinenr . $here . - "\n" . $subjectline . "\n" . - $line . "\n"); + if (length($line) != 0) { + WARN("NONBLANK_AFTER_SUMMARY", + "non-blank line after " . + "summary line\n" . + $sublinenr . $here . + "\n" . $subjectline . + "\n" . $line . "\n"); + } } } elsif ($line=~/^Subject: \[[^\]]*\] (.*)/) { $shorttext = CHECK_NEXT_SHORTTEXT; |
