From: Nicolai Fischer <nicolai.fischer@fau.de>
To: linux-kernel@vger.kernel.org
Cc: joe@perches.com, apw@canonical.com, akpm@linux-foundation.org,
nicolai.fischer@fau.de, johannes.czekay@fau.de,
linux-kernel@i4.cs.fau.de
Subject: [PATCH v3 4/5] checkpatch: kconfig: clarify warning for paragraph length
Date: Sun, 3 Jan 2021 08:50:14 +0100 [thread overview]
Message-ID: <20210103075015.23946-5-nicolai.fischer@fau.de> (raw)
In-Reply-To: <20210103075015.23946-1-nicolai.fischer@fau.de>
Currently checkpatch displays a warning if it detects a help text
of a Kconfig option which is too short. However the warning does
not contain any further information.
This adds the expected and currently detected number of lines
to the warning, which makes it more obvious why checkpatch
is warning.
Furthermore this makes it easier to quickly identify false
positives, e.g. when a help message contains a Kconfig keyword
and falsely triggers checkpatch to stop counting lines,
it will be more apparent, because the user can see how many lines
they wrote and how many of those were counted correctly.
Co-developed-by: Johannes Czekay <johannes.czekay@fau.de>
Signed-off-by: Johannes Czekay <johannes.czekay@fau.de>
Signed-off-by: Nicolai Fischer <nicolai.fischer@fau.de>
---
scripts/checkpatch.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 209880810aaa..805b5870803f 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3356,7 +3356,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);
+ "please write a paragraph ($length/$min_conf_desc_length lines) that describes the config symbol fully\n" . $herecurr);
}
if ($is_start && $is_end && defined $help_stat_real) {
WARN("CONFIG_DESCRIPTION",
--
2.29.2
next prev parent reply other threads:[~2021-01-03 7:51 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-14 10:22 [PATCH 0/2] checkpatch: update kconfig parsing Nicolai Fischer
2020-12-26 14:05 ` [PATCH v2 0/4] " Nicolai Fischer
2020-12-26 14:05 ` [PATCH v2 1/4] checkpatch: kconfig: replace '---help---' with 'help' Nicolai Fischer
2020-12-26 14:05 ` [PATCH v2 2/4] checkpatch: kconfig: add missing types to regex Nicolai Fischer
2020-12-26 14:05 ` [PATCH v2 3/4] checkpatch: kconfig: enforce help text indentation Nicolai Fischer
2020-12-26 15:50 ` Joe Perches
2020-12-26 14:05 ` [PATCH v2 4/4] checkpatch: kconfig: clarify warning for paragraph length Nicolai Fischer
2021-01-03 7:50 ` [PATCH v3 0/5] update kconfig parsing Nicolai Fischer
2021-01-03 7:50 ` [PATCH v3 1/5] checkpatch: kconfig: replace '---help---' with 'help' Nicolai Fischer
2021-01-03 7:50 ` [PATCH v3 2/5] checkpatch: kconfig: add missing types to regex Nicolai Fischer
2021-01-03 7:50 ` [PATCH v3 3/5] checkpatch: kconfig: enforce help text indentation Nicolai Fischer
2021-01-04 22:09 ` Joe Perches
2021-01-05 8:57 ` Joe Perches
2021-01-05 15:49 ` Nicolai Fischer
2021-01-03 7:50 ` Nicolai Fischer [this message]
2021-01-03 7:50 ` [PATCH v3 5/5] checkpatch: kconfig: enforce block indentation Nicolai Fischer
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=20210103075015.23946-5-nicolai.fischer@fau.de \
--to=nicolai.fischer@fau.de \
--cc=akpm@linux-foundation.org \
--cc=apw@canonical.com \
--cc=joe@perches.com \
--cc=johannes.czekay@fau.de \
--cc=linux-kernel@i4.cs.fau.de \
--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
all inboxes | Powered by JetHome®