linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] checkpatch.pl: Improve WARNING on Kconfig help
@ 2018-12-19  8:35 Igor Stoppa
  2018-12-19 10:44 ` Joe Perches
  0 siblings, 1 reply; 9+ messages in thread
From: Igor Stoppa @ 2018-12-19  8:35 UTC (permalink / raw)
  To: Andy Whitcroft, Joe Perches; +Cc: igor.stoppa, linux-kernel

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 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index c883ec55654f..e255f0423cca 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2931,7 +2931,8 @@ 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);
+				     "please write a paragraph (" .$min_conf_desc_length . " lines)" .
+				     " that describes the config symbol fully\n" . $herecurr);
 			}
 			#print "is_start<$is_start> is_end<$is_end> length<$length>\n";
 		}
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-12-19 23:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2018-12-19 19:17         ` Joe Perches
2018-12-19 19:39           ` Andi Kleen
2018-12-19 23:23           ` Igor Stoppa

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).