public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] checkpatch: Introduce check for format of Fixes line in commit log
@ 2017-10-10 22:44 Parav Pandit
  2017-10-19  5:52 ` Parav Pandit
  0 siblings, 1 reply; 4+ messages in thread
From: Parav Pandit @ 2017-10-10 22:44 UTC (permalink / raw)
  To: joe, apw; +Cc: linux-kernel, linux-rdma, parav, Brad Erickson

This patch introduces a format check for 'Fixes' line in commit log
for 12 characters commit id and format for Fixes as ("...").

Its created against linux-rdma Doug's tree [1].

[1] git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma.git

Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Brad Erickson <bradley@mellanox.com>
---
 scripts/checkpatch.pl | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index dd2c262..7d933e4 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2548,6 +2548,14 @@ sub process {
 			      "Remove Gerrit Change-Id's before submitting upstream.\n" . $herecurr);
 		}
 
+# Check for incorrect format for Fixes line in commit log
+		if ($in_commit_log && $line =~ /^\s*Fixes:/i) {
+			if ($line !~ /^\s*Fixes: [a-z0-9]{12} \(\".*?\"\)$/i) {
+				ERROR("FIXES_FORMAT",
+				      "Follow format of Fixes: <12 characters commit id> (\"...\")\n" . $herecurr);
+			}
+		}
+
 # Check if the commit log is in a possible stack dump
 		if ($in_commit_log && !$commit_log_possible_stack_dump &&
 		    ($line =~ /^\s*(?:WARNING:|BUG:)/ ||
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-10-19  6:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-10 22:44 [PATCH] checkpatch: Introduce check for format of Fixes line in commit log Parav Pandit
2017-10-19  5:52 ` Parav Pandit
2017-10-19  5:57   ` Joe Perches
2017-10-19  6:11     ` Parav Pandit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox