<div dir="auto">Sounds good to me. </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Dwaipayan Ray <<a href="mailto:dwaipayanray1@gmail.com">dwaipayanray1@gmail.com</a>> schrieb am Sa., 23. Jan. 2021, 11:12:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Sat, Jan 23, 2021 at 8:44 AM Lukas Bulwahn <<a href="mailto:lukas.bulwahn@gmail.com" target="_blank" rel="noreferrer">lukas.bulwahn@gmail.com</a>> wrote:<br>
><br>
> On Fri, Jan 22, 2021 at 10:27 PM Dwaipayan Ray <<a href="mailto:dwaipayanray1@gmail.com" target="_blank" rel="noreferrer">dwaipayanray1@gmail.com</a>> wrote:<br>
> ><br>
> > Hi Lukas and all,<br>
> > Recently while going through the warnings emitted by checkpatch,<br>
> > the necessity of a verbose mode came up once again. Joe had<br>
> > already suggested that a verbose mode would probably be worked<br>
> > on.<br>
> ><br>
> > As for how that could be done, that leaves us at a couple of options.<br>
> > Since writing verbose messages for all warnings aren't possible at once,<br>
> > there can be an optional extension when emitting messages:<br>
> ><br>
> > Currently, a warning can be emitted by<br>
> > WARN("TYPE", "Message")<br>
> > which could be converted to say:<br>
> > WARN('TYPE", "Message", "Verbose")<br>
> ><br>
> > Another way is to leave the original warning emitting syntax intact<br>
> > and instead go for a dictionary for verbose messages:<br>
> > our %dict = (<br>
> > "TYPE1" => "Verbose",<br>
> > "TYPE2" => "Verbose"<br>
> > ...);<br>
> ><br>
> > Although this leaves us the ability to customize the verbose output<br>
> > for each warning of a particular type.<br>
> ><br>
> > Which do you think would be best? Certainly more options might be<br>
> > possible, so any new inputs will be nice as well!<br>
> ><br>
><br>
> I think any of the two approaches would work.<br>
><br>
> But how about a completely different approach?<br>
><br>
> The verbose message is really an explanation of why kernel developers<br>
> think this rule should be followed (what is the history, what does it<br>
> try to warn about, what are possible fixes, what are accepted<br>
> deviations, ...).<br>
><br>
> So, this should not be placed into the <a href="http://checkpatch.pl" rel="noreferrer noreferrer" target="_blank">checkpatch.pl</a> script itself,<br>
> but into Documentation.<br>
><br>
> <a href="http://checkpatch.pl" rel="noreferrer noreferrer" target="_blank">checkpatch.pl</a> would simply quickly parse the Documentation and present<br>
> the content for the specific rules that were violated.<br>
><br>
> Let's say this Documentation is in<br>
> ./Documentation/tools/checkpatch.rst, and they contain subsections<br>
> with labels/name with the TYPE identifier. Then when a warning of TYPE<br>
> is relevant for a specific patch, you print the description from that<br>
> one subsection.<br>
><br>
> In checkpatch itself, you would only need a very generic mechanism then.<br>
><br>
<br>
That sounds great to me!<br>
Even I had it in mind but thought maybe checkpatch could be less<br>
reliant on other<br>
files. But this also solves our purpose for an external documentation<br>
for checkpatch<br>
rules, so its a kinda win win situation.<br>
<br>
I think maybe we will need a special structure for the documentation file itself<br>
but its certainly doable.<br>
<br>
Do you think I should go on to propose this idea to Joe now?<br>
<br>
Thanks,<br>
Dwaipayan.<br>
</blockquote></div>