Re: [PATCH 2/2] checkpatch: kconfig: add missing types to regex

From: Joe Perches
Date: Fri Dec 25 2020 - 12:45:10 EST


On Fri, 2020-12-25 at 18:27 +0100, Nicolai Fischer wrote:
> On 12/21/20 6:17 PM, Joe Perches wrote:
[]
> > The message you used:
> > + WARN("CONFIG_DESCRIPTION",
> > + "help text is not indented 2 spaces more than the help keyword\n" . $herecurr);
> >
> > is IMO a bit oddly phrased and could/should test only
> > the first line after the help keyword and show the help
> > line using $hereprev.
> >
> > The problem with $herecurr is, that it always contains the first line of the Kconfig option.
> The loop which actually determines if the warning is to be displayed, leaves $herecurr and likewise $hereprev unaffected.
>
> So printing $hereprev would unfortunately not be any more helpful than $herecurr.

> Because $herecurr and $hereprev also contain the line number, among other things, I am not sure what would be the best way
> to address this.

There is a mechanism to create an output message block: get_stat_real
that could be used.