+ checkpatch-warn-when-a-patch-doesnt-have-a-description.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: checkpatch: warn when a patch doesn't have a description
has been added to the -mm tree.  Its filename is
     checkpatch-warn-when-a-patch-doesnt-have-a-description.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/checkpatch-warn-when-a-patch-doesnt-have-a-description.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/checkpatch-warn-when-a-patch-doesnt-have-a-description.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Joe Perches <joe@xxxxxxxxxxx>
Subject: checkpatch: warn when a patch doesn't have a description

Potential patches should have a commit description.  Emit a warning when
there isn't one.

Link: http://lkml.kernel.org/r/1b099f4d8373aa583a17011992676bf0f3f09eee.camel@xxxxxxxxxxx
Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>
Suggested-by: Prakruthi Deepak Heragu <pheragu@xxxxxxxxxxxxxx>
Reviewed-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 scripts/checkpatch.pl |   13 +++++++++++++
 1 file changed, 13 insertions(+)

--- a/scripts/checkpatch.pl~checkpatch-warn-when-a-patch-doesnt-have-a-description
+++ a/scripts/checkpatch.pl
@@ -2253,6 +2253,7 @@ sub process {
 	my $in_header_lines = $file ? 0 : 1;
 	my $in_commit_log = 0;		#Scanning lines before patch
 	my $has_commit_log = 0;		#Encountered lines before patch
+	my $commit_log_lines = 0;	#Number of commit log lines
 	my $commit_log_possible_stack_dump = 0;
 	my $commit_log_long_line = 0;
 	my $commit_log_has_diff = 0;
@@ -2510,6 +2511,18 @@ sub process {
 
 		$cnt_lines++ if ($realcnt != 0);
 
+# Verify the existence of a commit log if appropriate
+# 2 is used because a $signature is counted in $commit_log_lines
+		if ($in_commit_log) {
+			if ($line !~ /^\s*$/) {
+				$commit_log_lines++;	#could be a $signature
+			}
+		} else if ($has_commit_log && $commit_log_lines < 2) {
+			WARN("COMMIT_MESSAGE",
+			     "Missing commit description - Add an appropriate one\n");
+			$commit_log_lines = 2;	#warn only once
+		}
+
 # Check if the commit log has what seems like a diff which can confuse patch
 		if ($in_commit_log && !$commit_log_has_diff &&
 		    (($line =~ m@^\s+diff\b.*a/[\w/]+@ &&
_

Patches currently in -mm which might be from joe@xxxxxxxxxxx are

spdxcheck-work-with-current-head-licenses-directory.patch
checkpatch-add-a-strict-test-for-structs-with-bool-member-definitions.patch
checkpatch-add-fix-for-concatenated_string-and-string_fragments.patch
checkpatch-improve-runtime-execution-speed-a-little.patch
checkpatch-fix-macro-argument-reuse-test.patch
checkpatch-validate-spdx-license-with-spdxcheckpy.patch
checkpatch-fix-krealloc-reuse-test.patch
checkpatch-check-for-functions-with-passed-by-value-structs-or-unions.patch
checkpatch-warn-when-a-patch-doesnt-have-a-description.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux