[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 27 Aug 2014 18:38:21 -0700
From: Joe Perches <joe@...ches.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Andy Whitcroft <apw@...onical.com>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Joe Lawrence <joe.lawrence@...atus.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH] checkpatch: Allow commit descriptions on separate line from
commit id
The general form for commit id and description is
'Commit <12+hexdigits> ("commit description/subject line")'
But commit logs often have relatively long commit ids and
the commit description is on a separate line like:
Some explanation as to why commit <12+hexdigits>
("commit description/subject line") is improved.
Allow this form.
Signed-off-by: Joe Perches <joe@...ches.com>
Suggested-by: Joe Lawrence <joe.lawrence@...atus.com
Suggested-by: Geert Uytterhoeven <geert@...ux-m68k.org>
---
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index d89857d..4d869dd 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2133,7 +2133,10 @@ sub process {
# Check for improperly formed commit descriptions
if ($in_commit_log &&
$line =~ /\bcommit\s+[0-9a-f]{5,}/i &&
- $line !~ /\b[Cc]ommit [0-9a-f]{12,40} \("/) {
+ !($line =~ /\b[Cc]ommit [0-9a-f]{12,40} \("/ ||
+ ($line =~ /\b[Cc]ommit [0-9a-f]{12,40}\s*$/ &&
+ defined $rawlines[$linenr] &&
+ $rawlines[$linenr] =~ /^\s*\("/))) {
$line =~ /\b(c)ommit\s+([0-9a-f]{5,})/i;
my $init_char = $1;
my $orig_commit = lc($2);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists