Martin Roth has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/63032 )
Change subject: util/lint/checkpatch: Warn on period at the end of commit subject ......................................................................
util/lint/checkpatch: Warn on period at the end of commit subject
This gives a warning when there's a period at the end of the commit subject line.
Change-Id: If95bef3ba01e0ac13ce18045928081040abef4fd Signed-off-by: Martin Roth martin@coreboot.org --- M util/lint/checkpatch.pl 1 file changed, 6 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/32/63032/1
diff --git a/util/lint/checkpatch.pl b/util/lint/checkpatch.pl index 9355186..b3a501c 100755 --- a/util/lint/checkpatch.pl +++ b/util/lint/checkpatch.pl @@ -2673,14 +2673,18 @@
# coreboot: The line subject limit is 65 # Check for line lengths > 65 in commit subject +# Check for a period at the end of the subject line if ($in_header_lines && $line =~ /^Subject: /) { $line = $line.$rawlines[$linenr]; $line =~ s/^Subject: [PATCH] //; if (length($line) > 65) { - WARN("COMMIT_LOG_LONG_LINE", - "Possible long commit subject (prefer a maximum 65 characters)\n" . $herecurr); + WARN("COMMIT_LOG_LONG_LINE", + "Possible long commit subject (prefer a maximum 65 characters)\n" . $herecurr); } + if ($line =~ /.$/) { + WARN("SUBJECT_HAS_FULL_STOP", + "Subject line should not end with a period.\n" . $herecurr); }
# Reset possible stack dump if a blank line is found