summaryrefslogtreecommitdiffstats
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-07-30 23:41:18 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-31 02:25:17 +0200
commitce0338df3c9a43e709b8a478265b32b9edcc7ccc (patch)
tree7f6c7047b4e1215f11ce2f774091237c7b5fdeb8 /scripts/checkpatch.pl
parentcheckpatch: Update alignment check (diff)
downloadlinux-ce0338df3c9a43e709b8a478265b32b9edcc7ccc.tar.xz
linux-ce0338df3c9a43e709b8a478265b32b9edcc7ccc.zip
checkpatch: test for non-standard signatures
Warn on non-standard signature styles. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-xscripts/checkpatch.pl6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 630319acb826..3e04f80375de 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1600,13 +1600,17 @@ sub process {
# Check signature styles
if (!$in_header_lines &&
- $line =~ /^(\s*)($signature_tags)(\s*)(.*)/) {
+ $line =~ /^(\s*)([a-z0-9_-]+by:|$signature_tags)(\s*)(.*)/i) {
my $space_before = $1;
my $sign_off = $2;
my $space_after = $3;
my $email = $4;
my $ucfirst_sign_off = ucfirst(lc($sign_off));
+ if ($sign_off !~ /$signature_tags/) {
+ WARN("BAD_SIGN_OFF",
+ "Non-standard signature: $sign_off\n" . $herecurr);
+ }
if (defined $space_before && $space_before ne "") {
WARN("BAD_SIGN_OFF",
"Do not use whitespace before $ucfirst_sign_off\n" . $herecurr);