[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] scripts/checkpatch.pl: Enforce multiline commen
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH] scripts/checkpatch.pl: Enforce multiline comment syntax |
Date: |
Mon, 13 Aug 2018 10:01:06 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
On 13/08/2018 08:18, Thomas Huth wrote:
> On 08/10/2018 02:45 PM, Paolo Bonzini wrote:
>> On 10/08/2018 11:10, Peter Maydell wrote:
>>>> So my proposal, which is actually consistent with what QEMU is doing, is
>>>> the following:
>>>>
>>>> 1) the first line of a file should always be "/*", otherwise warn
>>>>
>>>> 2) a comment that starts with "/**" should have it on a lone line
>>>>
>>>> 3) every other multiline comment should start with
>>>> "/*<whitespace><something>"
>>> Personally I would prefer your suggestion, but as I say, there
>>> was no consensus in the thread for it, and there was consensus
>>> for "use the kernel's style here". I don't think we gain much
>>> from reopening the debate at this point.
>>
>> What we lose is that 3000 more new warnings appear. So if we make an
>> exception and convert all of the comments, I'm okay.
>
> Why do you want to enforce to convert all of them in one go? For example
> we still have also some TABs in some source files, and nobody cares
> about converting them all in one go. If we enforce the comments in new
> code, that should IMHO be good enough. Or make it a BiteSizeTask for the
> next GSoC maybe.
Because TABs are usually very few in a file and crept in by mistake (100
files have 5 or fewer TABs). If there are many, it's almost always in
files that nobody touches (exception: linux-user/syscall.c and
linux-user/syscall_defs.h). For what it's worth, I'd be in favor of
changing TABs to spaces in files that only have a few of them or in
those two linux-user files.
The 3-line comment style is in files that are actively developed and
would become inconsistent over a very short time.
Paolo
- [Qemu-devel] [PATCH] scripts/checkpatch.pl: Enforce multiline comment syntax, Peter Maydell, 2018/08/09
- Re: [Qemu-devel] [PATCH] scripts/checkpatch.pl: Enforce multiline comment syntax, Paolo Bonzini, 2018/08/09
- Re: [Qemu-devel] [PATCH] scripts/checkpatch.pl: Enforce multiline comment syntax, Peter Maydell, 2018/08/09
- Re: [Qemu-devel] [PATCH] scripts/checkpatch.pl: Enforce multiline comment syntax, Paolo Bonzini, 2018/08/10
- Re: [Qemu-devel] [PATCH] scripts/checkpatch.pl: Enforce multiline comment syntax, Peter Maydell, 2018/08/10
- Re: [Qemu-devel] [PATCH] scripts/checkpatch.pl: Enforce multiline comment syntax, Paolo Bonzini, 2018/08/10
- Re: [Qemu-devel] [PATCH] scripts/checkpatch.pl: Enforce multiline comment syntax, Peter Maydell, 2018/08/10
- Re: [Qemu-devel] [PATCH] scripts/checkpatch.pl: Enforce multiline comment syntax, Paolo Bonzini, 2018/08/10
- Re: [Qemu-devel] [PATCH] scripts/checkpatch.pl: Enforce multiline comment syntax, Thomas Huth, 2018/08/13
- Re: [Qemu-devel] [PATCH] scripts/checkpatch.pl: Enforce multiline comment syntax,
Paolo Bonzini <=
- Re: [Qemu-devel] [PATCH] scripts/checkpatch.pl: Enforce multiline comment syntax, Markus Armbruster, 2018/08/10
- Re: [Qemu-devel] [PATCH] scripts/checkpatch.pl: Enforce multiline comment syntax, Paolo Bonzini, 2018/08/10
- Re: [Qemu-devel] [PATCH] scripts/checkpatch.pl: Enforce multiline comment syntax, Markus Armbruster, 2018/08/10
Re: [Qemu-devel] [PATCH] scripts/checkpatch.pl: Enforce multiline comment syntax, Markus Armbruster, 2018/08/10
Re: [Qemu-devel] [PATCH] scripts/checkpatch.pl: Enforce multiline comment syntax, Thomas Huth, 2018/08/13