+ checkpatch-submittingpatches-suggest-line-wrapping-commit-messages-at-72-columns.patch added to -mm tree

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

 



The patch titled
     Subject: checkpatch/SubmittingPatches: suggest line wrapping commit messages at 72 columns
has been added to the -mm tree.  Its filename is
     checkpatch-submittingpatches-suggest-line-wrapping-commit-messages-at-72-columns.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/checkpatch-submittingpatches-suggest-line-wrapping-commit-messages-at-72-columns.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/checkpatch-submittingpatches-suggest-line-wrapping-commit-messages-at-72-columns.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/SubmitChecklist 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/SubmittingPatches: suggest line wrapping commit messages at 72 columns

Commit messages are sometimes overly long.
Suggest line wrapping at 72 columns.

Add a checkpatch test for long commit messages as well.

Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>
Cc: Jonathan Corbet <corbet@xxxxxxx>
Acked-by: David S. Miller <davem@xxxxxxxxxxxxx>
Cc: Ian Morris <ipm@xxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 Documentation/SubmittingPatches |    4 ++--
 scripts/checkpatch.pl           |    9 +++++++++
 2 files changed, 11 insertions(+), 2 deletions(-)

diff -puN Documentation/SubmittingPatches~checkpatch-submittingpatches-suggest-line-wrapping-commit-messages-at-72-columns Documentation/SubmittingPatches
--- a/Documentation/SubmittingPatches~checkpatch-submittingpatches-suggest-line-wrapping-commit-messages-at-72-columns
+++ a/Documentation/SubmittingPatches
@@ -614,8 +614,8 @@ The canonical patch message body contain
 
   - An empty line.
 
-  - The body of the explanation, which will be copied to the
-    permanent changelog to describe this patch.
+  - The body of the explanation, line wrapped at 72 columns, which will
+    be copied to the permanent changelog to describe this patch.
 
   - The "Signed-off-by:" lines, described above, which will
     also go in the changelog.
diff -puN scripts/checkpatch.pl~checkpatch-submittingpatches-suggest-line-wrapping-commit-messages-at-72-columns scripts/checkpatch.pl
--- a/scripts/checkpatch.pl~checkpatch-submittingpatches-suggest-line-wrapping-commit-messages-at-72-columns
+++ a/scripts/checkpatch.pl
@@ -1898,6 +1898,7 @@ sub process {
 
 	my $in_header_lines = $file ? 0 : 1;
 	my $in_commit_log = 0;		#Scanning lines before patch
+	my $commit_log_long_line = 0;
 	my $reported_maintainer_file = 0;
 	my $non_utf8_charset = 0;
 
@@ -2233,6 +2234,14 @@ sub process {
 			      "Remove Gerrit Change-Id's before submitting upstream.\n" . $herecurr);
 		}
 
+# Check for line lengths > 72 in commit log, warn once
+		if ($in_commit_log && !$commit_log_long_line &&
+		    length($line) > 72) {
+			WARN("COMMIT_LOG_LONG_LINE",
+			     "Possible unwrapped commit description (prefer maximum 72 chars per line)\n" . $herecurr);
+			$commit_log_long_line = 1;
+		}
+
 # Check for git id commit length and improperly formed commit descriptions
 		if ($in_commit_log && $line =~ /\b(c)ommit\s+([0-9a-f]{5,})/i) {
 			my $init_char = $1;
_

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

ocfs2-logging-remove-static-buffer-use-vsprintf-extension-%pv.patch
ocfs2-neaten-do_error-ocfs2_error-and-ocfs2_abort.patch
proc-show-locks-in-proc-pid-fdinfo-x.patch
proc-show-locks-in-proc-pid-fdinfo-x-v2.patch
maintainers-use-tabs-consistently.patch
x86-mtrr-if-remove-use-of-seq_printf-return-value.patch
power-wakeup-remove-use-of-seq_printf-return-value.patch
rtc-remove-use-of-seq_printf-return-value.patch
ipc-remove-use-of-seq_printf-return-value.patch
microblaze-mb-remove-use-of-seq_printf-return-value.patch
microblaze-mb-remove-use-of-seq_printf-return-value-fix.patch
nios2-cpuinfo-remove-use-of-seq_printf-return-value.patch
arm-plat-pxa-remove-use-of-seq_printf-return-value.patch
openrisc-remove-use-of-seq_printf-return-value.patch
cris-remove-use-of-seq_printf-return-value.patch
cris-fasttimer-remove-use-of-seq_printf-return-value.patch
s390-remove-use-of-seq_printf-return-value.patch
proc-remove-use-of-seq_printf-return-value.patch
cgroup-remove-use-of-seq_printf-return-value.patch
tracing-remove-use-of-seq_printf-return-value.patch
lru_cache-remove-use-of-seq_printf-return-value.patch
parisc-remove-use-of-seq_printf-return-value.patch
lib-vsprintfc-even-faster-decimal-conversion.patch
mm-utilc-add-kstrimdup.patch
checkpatch-improve-no-space-is-necessary-after-a-cast-test.patch
checkpatch-add-spell-checking-of-email-subject-line.patch
checkpatch-spell-check-reudce.patch
checkpatch-add-optional-codespell-dictionary-to-find-more-typos.patch
checkpatch-match-more-world-writable-permissions.patch
checkpatch-match-more-world-writable-permissions-fix.patch
checkpatch-improve-return-negative-errno-check.patch
checkpatch-add-test-for-repeated-const-uses.patch
checkpatch-submittingpatches-suggest-line-wrapping-commit-messages-at-72-columns.patch
adfs-returning-correct-return-values.patch
linux-next.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 Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux