mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] checkpatch: add information on warning about `help` in Kconfig
@ 2024-10-03 19:20 Gabriela Bittencourt
  2024-10-20 15:21 ` Gabriela Bittencourt
  0 siblings, 1 reply; 2+ messages in thread
From: Gabriela Bittencourt @ 2024-10-03 19:20 UTC (permalink / raw)
  To: Andy Whitcroft, Joe Perches, Dwaipayan Ray, Lukas Bulwahn,
	linux-kernel, ~lkcamp/patches
  Cc: Gabriela Bittencourt, André Almeida

When writing a short help paragraph for a new KConfig option, developers
are prompted the following warning:

`please write a help paragraph that fully describes the config symbol`

However, developers might get confused about this message, giving that
they do have written a help paragraph, but checkpatch is not happy about
it, which can be perceived as a false positive. That happens because
checkpatch considers a fully descriptive paragraph one if at least
`$min_conf_desc_length` lines (as of now, 4 lines).

To make the warning more clear, output in the message the expected
length of the paragraph, so developers know better what checkpatch wants
from them.

Suggested-by: André Almeida <andrealmeid@igalia.com>
Signed-off-by: Gabriela Bittencourt <gbittencourt@lkcamp.dev>
---
 scripts/checkpatch.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 4427572b2477..8a6b6c22b175 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3660,7 +3660,7 @@ sub process {
 			    $help_length < $min_conf_desc_length) {
 				my $stat_real = get_stat_real($linenr, $ln - 1);
 				WARN("CONFIG_DESCRIPTION",
-				     "please write a help paragraph that fully describes the config symbol\n" . "$here\n$stat_real\n");
+				     "please write a help paragraph with at least $min_conf_desc_length lines that fully describes the config symbol\n" . "$here\n$stat_real\n");
 			}
 		}
 
2.46.2


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

* Re: [PATCH v2] checkpatch: add information on warning about `help` in Kconfig
  2024-10-03 19:20 [PATCH v2] checkpatch: add information on warning about `help` in Kconfig Gabriela Bittencourt
@ 2024-10-20 15:21 ` Gabriela Bittencourt
  0 siblings, 0 replies; 2+ messages in thread
From: Gabriela Bittencourt @ 2024-10-20 15:21 UTC (permalink / raw)
  To: Andy Whitcroft, Joe Perches, Dwaipayan Ray, Lukas Bulwahn,
	linux-kernel, ~lkcamp/patches
  Cc: André Almeida

Hi all,

On 10/3/24 4:20 PM, Gabriela Bittencourt wrote:
> When writing a short help paragraph for a new KConfig option, developers
> are prompted the following warning:
> 
> `please write a help paragraph that fully describes the config symbol`
> 
> However, developers might get confused about this message, giving that
> they do have written a help paragraph, but checkpatch is not happy about
> it, which can be perceived as a false positive. That happens because
> checkpatch considers a fully descriptive paragraph one if at least
> `$min_conf_desc_length` lines (as of now, 4 lines).
> 
> To make the warning more clear, output in the message the expected
> length of the paragraph, so developers know better what checkpatch wants
> from them.
> 
> Suggested-by: André Almeida <andrealmeid@igalia.com>
> Signed-off-by: Gabriela Bittencourt <gbittencourt@lkcamp.dev>
> ---
>   scripts/checkpatch.pl | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 4427572b2477..8a6b6c22b175 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -3660,7 +3660,7 @@ sub process {
>   			    $help_length < $min_conf_desc_length) {
>   				my $stat_real = get_stat_real($linenr, $ln - 1);
>   				WARN("CONFIG_DESCRIPTION",
> -				     "please write a help paragraph that fully describes the config symbol\n" . "$here\n$stat_real\n");
> +				     "please write a help paragraph with at least $min_conf_desc_length lines that fully describes the config symbol\n" . "$here\n$stat_real\n");
>   			}
>   		}
>   
> 2.46.2
> 

Gentle ping, it's being a while, is there any chance I could get some 
opinions on this? :)
I didn't find a specific mailing list I should send this patch, but if 
there is one, I'll be happy to know and add it in the cc.

Thanks in advance,

-- 
Gabriela Bittencourt


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

end of thread, other threads:[~2024-10-20 15:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-03 19:20 [PATCH v2] checkpatch: add information on warning about `help` in Kconfig Gabriela Bittencourt
2024-10-20 15:21 ` Gabriela Bittencourt

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®