From: Peter Maydell <peter.maydell@linaro.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
"patches@linaro.org" <patches@linaro.org>,
Thomas Huth <thuth@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] scripts/checkpatch.pl: Enforce multiline comment syntax
Date: Fri, 10 Aug 2018 10:10:14 +0100 [thread overview]
Message-ID: <CAFEAcA_4M195VD57LyNVyWTLos140v2e7ymvuiY+rtJ4ZTCXwg@mail.gmail.com> (raw)
In-Reply-To: <9da04e7f-bd0c-9d50-fb7c-026b5aaa674c@redhat.com>
On 10 August 2018 at 09:34, Paolo Bonzini <pbonzini@redhat.com> wrote:
> This is one of the cases where we are decently consistent:
>
> Lone "/*" or "/**": 9986 cases
> of which in the first column: 7617
> of which the first line in the file (license headers): 2834
> regex: ^[ \t]*/\*\*?[ \t]*$
>
> "/*" with the first line of the comment: 11246
> of which in the first column: 4985
> of which the first line in the file: 97
> regex: ^[ \t]*/\*\*?+(?:(?!\*/).)+?$
>
> License headers almost always have the "lone /*" format. Apart from
> license headers, 63% of the comments have the now-deprecated format.
>
> Inside functions, 73% of the comments have the now-deprecated format.
> Outside functions it's 50-50. That's because there are 2024 doc
> comments, which in turn are 50% of the comments that are 1) outside the
> functions 2) using a lone "/*".
>
> 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.
thanks
-- PMM
next prev parent reply other threads:[~2018-08-10 9:10 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-09 16:00 [Qemu-devel] [PATCH] scripts/checkpatch.pl: Enforce multiline comment syntax Peter Maydell
2018-08-09 16:43 ` Paolo Bonzini
2018-08-09 17:03 ` Peter Maydell
2018-08-10 8:34 ` Paolo Bonzini
2018-08-10 9:10 ` Peter Maydell [this message]
2018-08-10 12:45 ` Paolo Bonzini
2018-08-10 12:53 ` Peter Maydell
2018-08-10 17:06 ` Paolo Bonzini
2018-08-13 6:18 ` Thomas Huth
2018-08-13 8:01 ` Paolo Bonzini
2018-08-10 9:41 ` Markus Armbruster
2018-08-10 12:44 ` Paolo Bonzini
2018-08-10 13:19 ` Markus Armbruster
2018-08-10 6:22 ` Markus Armbruster
2018-08-10 9:07 ` Peter Maydell
2018-08-10 12:08 ` Markus Armbruster
2018-08-13 6:26 ` Thomas Huth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFEAcA_4M195VD57LyNVyWTLos140v2e7ymvuiY+rtJ4ZTCXwg@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=patches@linaro.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).