checkpatch: try to avoid poor patch subject lines
authorJoe Perches <joe@perches.com>
Fri, 13 Feb 2015 22:39:02 +0000 (14:39 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 14 Feb 2015 05:21:40 +0000 (21:21 -0800)
Naming the tool that found an issue in the subject line isn't very useful.
 Emit a warning when a common tool (currently checkpatch, sparse or
smatch) is in the subject line.

Signed-off-by: Joe Perches <joe@perches.com>
Suggested-by: Al Viro <viro@ZenIV.linux.org.uk>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/checkpatch.pl

index 3642b0d..9c720e1 100755 (executable)
@@ -2170,6 +2170,13 @@ sub process {
                        }
                }
 
+# Check email subject for common tools that don't need to be mentioned
+               if ($in_header_lines &&
+                   $line =~ /^Subject:.*\b(?:checkpatch|sparse|smatch)\b[^:]/i) {
+                       WARN("EMAIL_SUBJECT",
+                            "A patch subject line should describe the change not the tool that found it\n" . $herecurr);
+               }
+
 # Check for old stable address
                if ($line =~ /^\s*cc:\s*.*<?\bstable\@kernel\.org\b>?.*$/i) {
                        ERROR("STABLE_ADDRESS",