linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Igor Stoppa <igor.stoppa@gmail.com>
To: Andy Whitcroft <apw@canonical.com>, Joe Perches <joe@perches.com>
Cc: igor.stoppa@huawei.com, linux-kernel@vger.kernel.org
Subject: [PATCH] checkpatch.pl: Improve WARNING on Kconfig help
Date: Wed, 19 Dec 2018 20:55:44 +0200	[thread overview]
Message-ID: <20181219185544.6720-1-igor.stoppa@huawei.com> (raw)
In-Reply-To: <0fcf870749cae85490aa17cd637e2c933a792c90.camel@perches.com>

The checkpatch.pl script complains when the help section of a Kconfig
entry is too short, but it doesn't really explain what it is looking
for. Instead, it gives a generic warning that one should consider writing
a paragraph.

But what it *really* checks is that the help section is at least
.$min_conf_desc_length lines long.

Since the definition of what is a paragraph is not really carved in
stone (and actually the primary descriptions is "5 sentences"), make the
warning less ambiguous by expliciting the actual test condition, so that
one doesn't have to read checkpatch.pl sources, to figure out the actual
test.

Signed-off-by: Igor Stoppa <igor.stoppa@huawei.com>
CC: Andy Whitcroft <apw@canonical.com>
CC: Joe Perches <joe@perches.com>
CC: linux-kernel@vger.kernel.org
---
 scripts/checkpatch.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index c883ec55654f..33568d7e28d1 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2931,7 +2931,7 @@ sub process {
 			}
 			if ($is_start && $is_end && $length < $min_conf_desc_length) {
 				WARN("CONFIG_DESCRIPTION",
-				     "please write a paragraph that describes the config symbol fully\n" . $herecurr);
+				     "expecting a 'help' section of " .$min_conf_desc_length . "+ lines\n" . $herecurr);
 			}
 			#print "is_start<$is_start> is_end<$is_end> length<$length>\n";
 		}
-- 
2.19.1


  parent reply	other threads:[~2018-12-19 18:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-19  8:35 [PATCH] checkpatch.pl: Improve WARNING on Kconfig help Igor Stoppa
2018-12-19 10:44 ` Joe Perches
2018-12-19 11:59   ` Andy Whitcroft
2018-12-19 12:29     ` Joe Perches
2018-12-19 12:43       ` Igor Stoppa
2018-12-19 18:55       ` Igor Stoppa [this message]
2018-12-19 19:17         ` Joe Perches
2018-12-19 19:39           ` Andi Kleen
2018-12-19 23:23           ` Igor Stoppa

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=20181219185544.6720-1-igor.stoppa@huawei.com \
    --to=igor.stoppa@gmail.com \
    --cc=apw@canonical.com \
    --cc=igor.stoppa@huawei.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).