[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a13641bc42f2981e7997f4a1900d5a480cc2ee6d.camel@perches.com>
Date: Thu, 26 Jul 2018 18:26:46 -0700
From: Joe Perches <joe@...ches.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Prakruthi Deepak Heragu <pheragu@...eaurora.org>,
Greg KH <gregkh@...uxfoundation.org>,
Andy Whitcroft <apw@...onical.com>,
linux-kernel@...r.kernel.org, tsoni@...eaurora.org,
bryanh@...eaurora.org, ckadabi@...eaurora.org,
David Keitel <dkeitel@...eaurora.org>
Subject: Re: [PATCH] checkpatch: Warn when a patch doesn't have a description
On Thu, 2018-07-26 at 15:08 -0700, Andrew Morton wrote:
> On Wed, 25 Jul 2018 19:22:47 -0700 Joe Perches <joe@...ches.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
Powered by blists - more mailing lists