checkpatch: Add warning for blank lines in header
Signed-off-by: Israel Schlesinger <israels@codeaurora.org> Change-Id: Ie0da3c2842b3d1f194f60c277ae9961dcb82cd59 (cherry picked from commit 8212698c653945d0fd0783829822917bf13a5aab)
This commit is contained in:
committed by
Stephen Boyd
parent
eb3ce1b125
commit
864c6a2685
@@ -1381,6 +1381,7 @@ sub process {
|
||||
my $stashrawline="";
|
||||
my $subjectline="";
|
||||
my $sublinenr="";
|
||||
my $blankline_flag=0;
|
||||
|
||||
my $length;
|
||||
my $indent;
|
||||
@@ -1717,6 +1718,7 @@ sub process {
|
||||
if ($line =~ /^\s*signed-off-by:.*(quicinc|qualcomm)\.com/i) {
|
||||
WARN("invalid Signed-off-by identity\n" . $line );
|
||||
}
|
||||
$blankline_flag = 1;
|
||||
}
|
||||
|
||||
#check the patch for invalid author credentials
|
||||
@@ -1724,6 +1726,13 @@ sub process {
|
||||
WARN("invalid author identity\n" . $line );
|
||||
}
|
||||
|
||||
#check the patch for blank lines in the header
|
||||
if($line =~ /^\s*$/ && $blankline_flag == 1) {
|
||||
WARN("Blank lines should not appear in the header once signed off\n");
|
||||
} elsif($line =~ /^---$/) {
|
||||
$blankline_flag = 0;
|
||||
}
|
||||
|
||||
# Check for wrappage within a valid hunk of the file
|
||||
if ($realcnt != 0 && $line !~ m{^(?:\+|-| |\\ No newline|$)}) {
|
||||
ERROR("CORRUPTED_PATCH",
|
||||
|
||||
Reference in New Issue
Block a user