Skip to contentSkip to conversation

checkpatch: reduce git commit description style false positives

PATCH New [email protected] 1 participant 1 message Jun 3, 2016 Checkpatch

lore
Share & tools
lore
#0 lore raw

PATCH 7/11 checkpatch: reduce git commit description style false positives

From: Joe Perches <[email protected]>
Subject: checkpatch: reduce git commit description style false positives

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")'

Reduce the false positives.

---

 scripts/checkpatch.pl |    1 +
 1 file changed, 1 insertion(+)
scripts/checkpatch.pl renamed from scripts/checkpatch.pl~checkpatch-reduce-git-commit-description-style-false-positives +1 -0
diff -puN scripts/checkpatch.pl~checkpatch-reduce-git-commit-description-style-false-positives 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 &&

_