From: "罗勇刚(Yonggang Luo)" <luoyonggang@gmail.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
qemu-level <qemu-devel@nongnu.org>
Subject: Re: How about using clang-format instead checkpatch for fixing style?
Date: Fri, 9 Oct 2020 21:30:19 +0800 [thread overview]
Message-ID: <CAE2XoE_SC8moDRMqjoKQLDYE7XiG1OQyRYmhs+rE2ax_9hbWQQ@mail.gmail.com> (raw)
In-Reply-To: <27f82fe6-5b0f-7e35-29d9-7b00ae8f189e@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1489 bytes --]
On Fri, Oct 9, 2020 at 9:25 PM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> On 09/10/20 15:02, 罗勇刚(Yonggang Luo) wrote:
> > We can even using clang-format to format the whole repository.
>
> checkpatch does other checks than formatting.
>
> Reformatting the whole repository has been mentioned many times, people
> were worried of messing up the result of "git blame". But without doing
> that, it's hard to get rid of checkpatch because checkpatch only looks
> at the lines that are touched by the patch.
Make sense, clang-format can also only formatting the changed lines,
checkpatch also does what? do you means about the MAINTAINER? that can be
preserved
we can use clang-format as a part of checkpatch.
The current problem with checkpatch is that is doesn't understand C well.
Sometimes will arise werid errors.
For example, what's does this means?
25/30 Checking commit 9e2a36e4c279 (plugin: Getting qemu-plugin.h can be
included in multiple source file)
ERROR: storage class should be at the beginning of the declaration
#74: FILE: include/qemu/qemu-plugin.h:432:
+#define qemu_plugin_decl_symbol(symbol_name) extern symbol_name##_t
symbol_name
total: 1 errors, 0 warnings, 88 lines checked
Patch 25/30 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
>
> Paolo
>
--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
[-- Attachment #2: Type: text/html, Size: 1720 bytes --]
next prev parent reply other threads:[~2020-10-09 13:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-09 13:02 How about using clang-format instead checkpatch for fixing style? 罗勇刚(Yonggang Luo)
2020-10-09 13:25 ` Paolo Bonzini
2020-10-09 13:30 ` 罗勇刚(Yonggang Luo) [this message]
2020-10-09 13:38 ` Daniel P. Berrangé
2020-10-09 13:44 ` 罗勇刚(Yonggang Luo)
2020-10-09 13:48 ` 罗勇刚(Yonggang Luo)
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=CAE2XoE_SC8moDRMqjoKQLDYE7XiG1OQyRYmhs+rE2ax_9hbWQQ@mail.gmail.com \
--to=luoyonggang@gmail.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/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).