summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xextras/checkpatch.pl11
1 files changed, 11 insertions, 0 deletions
diff --git a/extras/checkpatch.pl b/extras/checkpatch.pl
index 00cb5a6ef39..7402e2a6556 100755
--- a/extras/checkpatch.pl
+++ b/extras/checkpatch.pl
@@ -1667,6 +1667,7 @@ sub process {
our $clean = 1;
my $signoff = 0;
+ my $subject_trailing_dot = 0;
my $is_patch = 0;
my $in_header_lines = 1;
@@ -1899,6 +1900,12 @@ sub process {
next if ($realfile =~ /(checkpatch.pl)/);
next if ($realfile =~ /\.(md|txt|doc|8|pdf|tex)$/);
+# Check that the subject does not have a trailing dot
+ if ($in_header_lines &&
+ $line =~ /^Subject: \[PATCH\] (.+)\.(\s*)$/) {
+ $subject_trailing_dot++;
+ }
+
# Check the patch for a signoff:
if ($line =~ /^\s*signed-off-by:/i) {
$signoff++;
@@ -4233,6 +4240,10 @@ sub process {
ERROR("NOT_UNIFIED_DIFF",
"Does not appear to be a unified-diff format patch\n");
}
+ if ($is_patch && $subject_trailing_dot != 0) {
+ ERROR("SUBJECT_TRAILING_DOT",
+ "The subject of the patch should not end with a dot.\n");
+ }
if ($is_patch && $chk_signoff && $signoff == 0) {
ERROR("MISSING_SIGN_OFF",
"Missing Signed-off-by: line(s)\n");