[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 0/1] checkpatch: checker for comment block
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 0/1] checkpatch: checker for comment block |
Date: |
Thu, 13 Dec 2018 19:07:46 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 |
On 13/12/18 19:01, Peter Maydell wrote:
> On Thu, 13 Dec 2018 at 17:57, Wainer dos Santos Moschetta
> <address@hidden> 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
- [Qemu-devel] [PATCH 0/1] checkpatch: checker for comment block, Wainer dos Santos Moschetta, 2018/12/13
- [Qemu-devel] [PATCH 1/1] checkpatch: check for malformed comment block., Wainer dos Santos Moschetta, 2018/12/13
- Re: [Qemu-devel] [PATCH 0/1] checkpatch: checker for comment block, Peter Maydell, 2018/12/13
- Re: [Qemu-devel] [PATCH 0/1] checkpatch: checker for comment block,
Paolo Bonzini <=
- Re: [Qemu-devel] [PATCH 0/1] checkpatch: checker for comment block, Peter Maydell, 2018/12/13
- Re: [Qemu-devel] [PATCH 0/1] checkpatch: checker for comment block, Paolo Bonzini, 2018/12/13
- Re: [Qemu-devel] [PATCH 0/1] checkpatch: checker for comment block, Markus Armbruster, 2018/12/14
- Re: [Qemu-devel] [PATCH 0/1] checkpatch: checker for comment block, Paolo Bonzini, 2018/12/14
- Re: [Qemu-devel] [PATCH 0/1] checkpatch: checker for comment block, Peter Maydell, 2018/12/14
- Re: [Qemu-devel] [PATCH 0/1] checkpatch: checker for comment block, Markus Armbruster, 2018/12/14
- Re: [Qemu-devel] [PATCH 0/1] checkpatch: checker for comment block, Peter Maydell, 2018/12/14
- Re: [Qemu-devel] [PATCH 0/1] checkpatch: checker for comment block, Markus Armbruster, 2018/12/14
Re: [Qemu-devel] [PATCH 0/1] checkpatch: checker for comment block, Wainer dos Santos Moschetta, 2018/12/14