lkml.org 
[lkml]   [2014]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[RFC PATCH] checkpatch: Warn on patch subjects with "checkpatch"
From
Date
I think patch subject lines with "checkpatch" in
them are almost never really useful.

Maybe a new checkpatch test to see if a subject line
is perhaps less than informational should be added.

Something like:
---
scripts/checkpatch.pl | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 31a731e..a690515 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2048,6 +2048,13 @@ sub process {
$in_commit_log = 0;
}

+# Check patch subject lines for "checkpatch" (but not checkpatch:)
+ if ($in_header_lines &&
+ $line =~ /^\s*subject:.*\bcheckpatch(?!(?:\.pl)?:)\b/i) {
+ WARN("BAD_PATCH_SUBJECT",
+ "Patch subjects with 'checkpatch' are not generally useful. Describe the change, not the tool that suggests the change.\n" . $herecurr);
+ }
+
# Check signature styles
if (!$in_header_lines &&
$line =~ /^(\s*)([a-z0-9_-]+by:|$signature_tags)(\s*)(.*)/i) {



\
 
 \ /
  Last update: 2014-08-12 18:41    [W:0.118 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site