History

checkpatch: special audit for revert commit line

Currently checkpatch.pl does not recognize git's default commit revert message and will complain about the hash format. Add special audit for revert commit message line to fix it.

Wei Wang committed 9 years ago

Commit e882dbf1 parent e4b7d301 file · +1 −0Browse files

Showing the changes to scripts/checkpatch.pl (1 of 1 file). Show all

Unified · Split

scripts/checkpatch.pl+1−0
@@ -2539,6 +2539,7 @@ sub process { · 2538 unmodified lines
2539# Check for git id commit length and improperly formed commit descriptions2539# Check for git id commit length and improperly formed commit descriptions
2540 if ($in_commit_log && !$commit_log_possible_stack_dump &&2540 if ($in_commit_log && !$commit_log_possible_stack_dump &&
2541 $line !~ /^\s*(?:Link|Patchwork|http|https|BugLink):/i &&2541 $line !~ /^\s*(?:Link|Patchwork|http|https|BugLink):/i &&
2542 $line !~ /^This reverts commit [0-9a-f]{7,40}/ &&
2542 ($line =~ /\bcommit\s+[0-9a-f]{5,}\b/i ||2543 ($line =~ /\bcommit\s+[0-9a-f]{5,}\b/i ||
2543 ($line =~ /(?:\s|^)[0-9a-f]{12,40}(?:[\s"'\(\[]|$)/i &&2544 ($line =~ /(?:\s|^)[0-9a-f]{12,40}(?:[\s"'\(\[]|$)/i &&
2544 $line !~ /[\<\[][0-9a-f]{12,40}[\>\]]/i &&2545 $line !~ /[\<\[][0-9a-f]{12,40}[\>\]]/i &&