]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
checkpatch: test for non-standard signatures
authorJoe Perches <joe@perches.com>
Sat, 21 Jul 2012 00:54:59 +0000 (10:54 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 25 Jul 2012 03:53:22 +0000 (13:53 +1000)
Warn on non-standard signature styles.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
scripts/checkpatch.pl

index 630319acb8264aed1c9bb628f89dd795ba05801f..3e04f80375de158f6f4389707efcfce990927616 100755 (executable)
@@ -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);