Skip to content

Commit a2fe16b

Browse files
JoePerchestorvalds
authored andcommitted
checkpatch: try to avoid poor patch subject lines
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>
1 parent 19c146a commit a2fe16b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

scripts/checkpatch.pl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2170,6 +2170,13 @@ sub process {
21702170
}
21712171
}
21722172

2173+
# Check email subject for common tools that don't need to be mentioned
2174+
if ($in_header_lines &&
2175+
$line =~ /^Subject:.*\b(?:checkpatch|sparse|smatch)\b[^:]/i) {
2176+
WARN("EMAIL_SUBJECT",
2177+
"A patch subject line should describe the change not the tool that found it\n" . $herecurr);
2178+
}
2179+
21732180
# Check for old stable address
21742181
if ($line =~ /^\s*cc:\s*.*<?\bstable\@kernel\.org\b>?.*$/i) {
21752182
ERROR("STABLE_ADDRESS",

0 commit comments

Comments
 (0)