mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 12:25:00 -04:00
Merge "checkpatch: Don't complain about MIME headers."
This commit is contained in:
commit
3d210e4fd1
1 changed files with 24 additions and 1 deletions
|
|
@ -18,6 +18,7 @@ use Encode qw(decode encode);
|
|||
use constant BEFORE_SHORTTEXT => 0;
|
||||
use constant IN_SHORTTEXT => 1;
|
||||
use constant AFTER_SHORTTEXT => 2;
|
||||
use constant CHECK_NEXT_SHORTTEXT => 3;
|
||||
use constant SHORTTEXT_LIMIT => 75;
|
||||
|
||||
my $P = $0;
|
||||
|
|
@ -2279,6 +2280,8 @@ sub process {
|
|||
my $prevrawline="";
|
||||
my $stashline="";
|
||||
my $stashrawline="";
|
||||
my $subjectline="";
|
||||
my $sublinenr="";
|
||||
|
||||
my $length;
|
||||
my $indent;
|
||||
|
|
@ -2578,8 +2581,28 @@ sub process {
|
|||
SHORTTEXT_LIMIT .
|
||||
" characters\n" . $herecurr);
|
||||
}
|
||||
} elsif ($shorttext == CHECK_NEXT_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");
|
||||
}
|
||||
}
|
||||
} elsif ($line=~/^Subject: \[[^\]]*\] (.*)/) {
|
||||
$shorttext = IN_SHORTTEXT;
|
||||
$shorttext = CHECK_NEXT_SHORTTEXT;
|
||||
$subjectline = $line;
|
||||
$sublinenr = "#$linenr & ";
|
||||
# Check for Subject line less than line limit
|
||||
if (length($1) > SHORTTEXT_LIMIT) {
|
||||
WARN("LONG_SUMMARY_LINE",
|
||||
"summary line over " .
|
||||
|
|
|
|||
Loading…
Reference in a new issue