diff options
| author | Jeff Johnson <jjohnson@codeaurora.org> | 2015-01-22 13:34:29 -0800 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:51:53 -0700 |
| commit | fa047df067b95efc880e4e7607fec85e26d1f0fd (patch) | |
| tree | d2bd46e5b753224dbb600f2315a2c14b213536c6 /scripts/checkpatch.pl | |
| parent | 7f055e49d5b23bba1980a22ecc2062f36e7a12ba (diff) | |
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>
Diffstat (limited to 'scripts/checkpatch.pl')
| -rwxr-xr-x | scripts/checkpatch.pl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index c45af9f9da2e..2da7d6b16c56 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -22,6 +22,7 @@ my $quiet = 0; my $tree = 1; my $chk_signoff = 1; my $chk_patch = 1; +my $chk_author = 1; my $tst_only; my $emacs = 0; my $terse = 0; @@ -64,6 +65,7 @@ Options: -q, --quiet quiet --no-tree run without a kernel tree --no-signoff do not check for 'Signed-off-by' line + --no-author do not check for unexpected authors --patch treat FILE as patchfile (default) --emacs emacs compile window format --terse one line per report @@ -137,6 +139,7 @@ GetOptions( 'tree!' => \$tree, 'signoff!' => \$chk_signoff, 'patch!' => \$chk_patch, + 'author!' => \$chk_author, 'emacs!' => \$emacs, 'terse!' => \$terse, 'showfile!' => \$showfile, @@ -2312,7 +2315,7 @@ sub process { "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", "invalid Signed-off-by identity\n" . $line ); } @@ -2447,7 +2450,7 @@ sub process { } #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 ); } |
