On 13/12/18 19:01, Peter Maydell wrote: > On Thu, 13 Dec 2018 at 17:57, Wainer dos Santos Moschetta > <waine...@redhat.com> wrote: >> >> Eduardo Habkost pointed out a malformed block of comments on my >> patch [1] that I had ran checkpatch.pl and no warn/error was >> reported. Then I realized the script does not catch such as >> case (or it had a bug). >> >> It turns out that checkpatch.pl does not parse comment blocks (If I >> understood >> its code correctly...). So I implemented a checker that warns about: >> 1. block doesn't begin on its own line. >> Example: >> /* blah blah >> * and blah blah >> */ > > I sent a patch to do this a little while back: > https://patchwork.kernel.org/patch/10561557/ > > It didn't get applied because Paolo disagreed with having > our tools enforcing what our style guide says.
I didn't disagree with that---I disagreed with having a single style in the style guide, because unlike most other blatant violations of the coding style (eg. braces), this one is pervasive in maintained code and I don't want code that I maintain to mix two comment styles. So I proposed two alternatives: - someone fixes all the comment blocks which are "starred" but don't have a lone "/*" at the beginning, and then we can commit that patch; - we allow "/* foo" on the first line, except for doc comments and for the first line of the file (author/license block), and fix the style guide accordingly. Paolo