Re: [PATCH] checkpatch.pl: Improve WARNING on Kconfig help

From: Igor Stoppa
Date: Wed Dec 19 2018 - 07:43:52 EST




On 19/12/2018 14:29, Joe Perches wrote:
On Wed, 2018-12-19 at 11:59 +0000, Andy Whitcroft wrote:
On Wed, Dec 19, 2018 at 02:44:36AM -0800, Joe Perches wrote:

To cover both cases perhaps:

"please ensure that this config symbols is described fully (less than
$min_conf_desc_length lines is quite brief)"

This is one of those checkpatch bleats I never
really thought was appropriate as some or many
Kconfig symbols are fully descriptive in even
with only a single line.

Also, it seems you are arguing for a checkpatch
--verbose-help output style rather than the
intentionally terse single line output that the
script produces today.

If I have to use --verbose, to understand that the warning is about me writing 3 lines when the script expects 4, I don't think it's particularly user friendly.

Let's write "Expected 4+ lines" or something equally clear.
It will fit in a row and get the job done.

That is something Al Viro once suggested in this thread:
https://lore.kernel.org/patchwork/patch/775901/

On Sat, 2017-04-01 at 05:08 +0100, Al Viro wrote:
On Fri, Mar 31, 2017 at 08:52:50PM -0700, Joe Perches wrote:
checkpatch messages are single line.

Too bad... Incidentally, being able to get more detailed explanation of
a warning might be a serious improvement, especially if it contains
the rationale. Hell, something like TeX handling of errors might be
a good idea - warning printed, offered actions include 'give more help',
'continue', 'exit', 'from now on suppress this kind of warning', 'from
now on just dump this kind of warning into log and keep going', 'from
now on dump all warnings into log and keep going'.

It's all good in general, but here the word "paragraph" is being abused, in the sense that it has been given an arbitrary meaning of "4 lines".
And the warning is even worse because it doesn't even acknowledge that I wrote something, even if it's a meager 1 or 2 lines.
Which is even more confusing.

As user, if I'm running checkpatch.pl and I get a warning, I should spend my time trying to decide if/how to fix it, not re-invoking it with extra options or reading its sources.

--
igor