From: Joe Perches <joe@perches.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Prakruthi Deepak Heragu <pheragu@codeaurora.org>,
Greg KH <gregkh@linuxfoundation.org>,
Andy Whitcroft <apw@canonical.com>,
linux-kernel@vger.kernel.org, tsoni@codeaurora.org,
bryanh@codeaurora.org, ckadabi@codeaurora.org,
David Keitel <dkeitel@codeaurora.org>
Subject: Re: [PATCH] checkpatch: Warn when a patch doesn't have a description
Date: Thu, 26 Jul 2018 18:26:46 -0700 [thread overview]
Message-ID: <a13641bc42f2981e7997f4a1900d5a480cc2ee6d.camel@perches.com> (raw)
In-Reply-To: <20180726150855.a9a3e81d5cdc4630c7f4ca2d@linux-foundation.org>
On Thu, 2018-07-26 at 15:08 -0700, Andrew Morton wrote:
> On Wed, 25 Jul 2018 19:22:47 -0700 Joe Perches <joe@perches.com> wrote:
>
> > Potential patches should have a commit description.
> > Emit a warning when there isn't one.
[]
> I did this:
>
> --- a/scripts/checkpatch.pl~checkpatch-warn-when-a-patch-doesnt-have-a-description-fix
> +++ a/scripts/checkpatch.pl
> @@ -2517,7 +2517,7 @@ sub process {
> if ($line !~ /^\s*$/) {
> $commit_log_lines++; #could be a $signature
> }
> - } else if ($has_commit_log && $commit_log_lines < 2) {
> + } elsif ($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
>
> But I worry that you didn't send out the version which you tested, so
> please check.
You're right, I inserted the wrong one.
Anyway, what you did is correct and that was the only change.
Thanks.
$ diff -urN cp_commit_log_lines.diff cp_commit_message.diff
--- cp_commit_log_lines.diff 2018-07-13 17:06:29.115337477 -0700
+++ cp_commit_message.diff 2018-07-15 05:46:29.878805336 -0700
@@ -2,7 +2,7 @@
1 file changed, 13 insertions(+)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
-index b5c875d7132b..8b5f3dae31c9 100755
+index b5c875d7132b..4ccf84079ea4 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2240,6 +2240,7 @@ sub process {
@@ -23,7 +23,7 @@
+ if ($line !~ /^\s*$/) {
+ $commit_log_lines++; #could be a $signature
+ }
-+ } else if ($has_commit_log && $commit_log_lines < 2) {
++ } elsif ($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
prev parent reply other threads:[~2018-07-27 1:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-13 21:40 [PATCH] checkpatch: Require commit text and warn on long commit text lines Prakruthi Deepak Heragu
2018-07-13 21:46 ` Joe Perches
2018-07-13 23:28 ` pheragu
2018-07-14 0:08 ` Joe Perches
2018-07-16 18:20 ` pheragu
2018-07-25 18:49 ` pheragu
2018-07-26 2:22 ` [PATCH] checkpatch: Warn when a patch doesn't have a description Joe Perches
2018-07-26 10:08 ` Greg KH
2018-07-26 22:08 ` Andrew Morton
2018-07-27 1:26 ` Joe Perches [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a13641bc42f2981e7997f4a1900d5a480cc2ee6d.camel@perches.com \
--to=joe@perches.com \
--cc=akpm@linux-foundation.org \
--cc=apw@canonical.com \
--cc=bryanh@codeaurora.org \
--cc=ckadabi@codeaurora.org \
--cc=dkeitel@codeaurora.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pheragu@codeaurora.org \
--cc=tsoni@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®