Using \b isn't good enough to isolate what appears to be a commit id in a commit message. Make sure there is a space or a quote like character after a continuous run of hexadecimal characters that could be a commit id.
Showing the changes to scripts/checkpatch.pl (1 of 1 file). Show all
Unified · Split
| @@ -2459,9 +2459,9 @@ sub process { · 2458 unmodified lines | ||
| 2459 | 2459 | |
| 2460 | 2460 | # Check for git id commit length and improperly formed commit descriptions |
| 2461 | 2461 | if ($in_commit_log && !$commit_log_possible_stack_dump && |
| 2462 | − $line !~ /^\s*(?:Link|Patchwork|http|BugLink):/i && | |
| 2462 | + $line !~ /^\s*(?:Link|Patchwork|http|https|BugLink):/i && | |
| 2463 | 2463 | ($line =~ /\bcommit\s+[0-9a-f]{5,}\b/i || |
| 2464 | − ($line =~ /\b[0-9a-f]{12,40}\b/i && | |
| 2464 | + ($line =~ /(?:\s|^)[0-9a-f]{12,40}(?:[\s"'\(\[]|$)/i && | |
| 2465 | 2465 | $line !~ /[\<\[][0-9a-f]{12,40}[\>\]]/i && |
| 2466 | 2466 | $line !~ /\bfixes:\s*[0-9a-f]{12,40}/i))) { |
| 2467 | 2467 | my $init_char = "c"; |