Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1408317

[PATCH] checkpatch: Reduce git commit description style false positives

From Joe Perches <joe@perches.com>
Newsgroups linux.kernel
Subject [PATCH] checkpatch: Reduce git commit description style false positives
Date 2016-05-27 23:30 +0200
Message-ID <rDxuq-b0-3@gated-at.bofh.it> (permalink)
References <rDxuq-b0-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Some lines in a commit log appear to be commit SHA1 ids like:

ERROR: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit 0123456789ab ("commit description")'
Link: http://lkml.kernel.org/r/40e03fd7aaf1f55c75d787128d6d17c5a71226c2.1464358556.git.vdavydov@virtuozzo.com

Reduce the false positives.

Reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Joe Perches <joe@perches.com>
---
 scripts/checkpatch.pl | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 6750595..4904ced 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2454,6 +2454,7 @@ sub process {
 
 # Check for git id commit length and improperly formed commit descriptions
 		if ($in_commit_log && !$commit_log_possible_stack_dump &&
+		    $line !~ /^\s*(?:Link|Patchwork|http|BugLink):/i &&
 		    ($line =~ /\bcommit\s+[0-9a-f]{5,}\b/i ||
 		     ($line =~ /\b[0-9a-f]{12,40}\b/i &&
 		      $line !~ /[\<\[][0-9a-f]{12,40}[\>\]]/i &&
-- 
2.8.0.rc4.16.g56331f8

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

[PATCH] checkpatch: Reduce git commit description style false positives Joe Perches <joe@perches.com> - 2016-05-27 23:30 +0200
  Re: [PATCH] checkpatch: Reduce git commit description style false  positives Joe Perches <joe@perches.com> - 2016-05-28 00:00 +0200
  Re: [PATCH] checkpatch: Reduce git commit description style false  positives Andrew Morton <akpm@linux-foundation.org> - 2016-05-28 00:00 +0200

csiph-web