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>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63032
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
This commit is contained in:
Martin Roth 2022-03-22 18:06:15 -06:00 committed by Martin L Roth
parent 341a53d1c5
commit 97e7eea976
1 changed files with 5 additions and 0 deletions

View File

@ -2854,6 +2854,7 @@ sub process {
# coreboot: The line subject limit is 65
# Check for line lengths > 65 in commit subject
# coreboot: Check for a period at the end of the subject line
if ($in_header_lines &&
$line =~ /^Subject: /) {
$line = $line.$rawlines[$linenr];
@ -2862,6 +2863,10 @@ sub process {
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