mirror of
https://github.com/joel16/android_kernel_sony_msm8994.git
synced 2024-11-30 07:31:23 +00:00
checkpatch: add support for --noauthor
Commit "scripts: checkpatch.pl: warn on invalid credentials" added to checkpatch.pl logic to unconditionally check for invalid author credentials. Add a flag to allow override of this behavior. Change-Id: Ib254cc6f73c4de857ba923e6170750262cde01ad Signed-off-by: Jeff Johnson <jjohnson@codeaurora.org>
This commit is contained in:
parent
51c75088b8
commit
cd0d973101
@ -26,6 +26,7 @@ my $quiet = 0;
|
|||||||
my $tree = 1;
|
my $tree = 1;
|
||||||
my $chk_signoff = 1;
|
my $chk_signoff = 1;
|
||||||
my $chk_patch = 1;
|
my $chk_patch = 1;
|
||||||
|
my $chk_author = 1;
|
||||||
my $tst_only;
|
my $tst_only;
|
||||||
my $emacs = 0;
|
my $emacs = 0;
|
||||||
my $terse = 0;
|
my $terse = 0;
|
||||||
@ -61,6 +62,7 @@ Options:
|
|||||||
-q, --quiet quiet
|
-q, --quiet quiet
|
||||||
--no-tree run without a kernel tree
|
--no-tree run without a kernel tree
|
||||||
--no-signoff do not check for 'Signed-off-by' line
|
--no-signoff do not check for 'Signed-off-by' line
|
||||||
|
--no-author do not check for unexpected authors
|
||||||
--patch treat FILE as patchfile (default)
|
--patch treat FILE as patchfile (default)
|
||||||
--emacs emacs compile window format
|
--emacs emacs compile window format
|
||||||
--terse one line per report
|
--terse one line per report
|
||||||
@ -128,6 +130,7 @@ GetOptions(
|
|||||||
'tree!' => \$tree,
|
'tree!' => \$tree,
|
||||||
'signoff!' => \$chk_signoff,
|
'signoff!' => \$chk_signoff,
|
||||||
'patch!' => \$chk_patch,
|
'patch!' => \$chk_patch,
|
||||||
|
'author!' => \$chk_author,
|
||||||
'emacs!' => \$emacs,
|
'emacs!' => \$emacs,
|
||||||
'terse!' => \$terse,
|
'terse!' => \$terse,
|
||||||
'f|file!' => \$file,
|
'f|file!' => \$file,
|
||||||
@ -2021,7 +2024,7 @@ sub process {
|
|||||||
"email address '$email' might be better as '$suggested_email$comment'\n" . $herecurr);
|
"email address '$email' might be better as '$suggested_email$comment'\n" . $herecurr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($line =~ /^\s*signed-off-by:.*(quicinc|qualcomm)\.com/i) {
|
if ($chk_author && $line =~ /^\s*signed-off-by:.*(quicinc|qualcomm)\.com/i) {
|
||||||
WARN("BAD_SIGN_OFF",
|
WARN("BAD_SIGN_OFF",
|
||||||
"invalid Signed-off-by identity\n" . $line );
|
"invalid Signed-off-by identity\n" . $line );
|
||||||
}
|
}
|
||||||
@ -2039,7 +2042,7 @@ sub process {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#check the patch for invalid author credentials
|
#check the patch for invalid author credentials
|
||||||
if ($line =~ /^From:.*(quicinc|qualcomm)\.com/) {
|
if ($chk_author && $line =~ /^From:.*(quicinc|qualcomm)\.com/) {
|
||||||
WARN("BAD_AUTHOR", "invalid author identity\n" . $line );
|
WARN("BAD_AUTHOR", "invalid author identity\n" . $line );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user