mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Mickaël Salaün" <mic@digikod.net>
To: Miguel Ojeda <ojeda@kernel.org>,
	Andy Whitcroft <apw@canonical.com>, Joe Perches <joe@perches.com>,
	Dwaipayan Ray <dwaipayanray1@gmail.com>,
	Lukas Bulwahn <lukas.bulwahn@gmail.com>
Cc: Nathan Chancellor <nathan@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Tom Rix <trix@redhat.com>,
	llvm@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: clang-format inconsistencies with checkpatch.pl
Date: Sat, 23 Apr 2022 13:45:32 +0200	[thread overview]
Message-ID: <8b6b252b-47a6-9d52-f0bd-10d3bc4ad244@digikod.net> (raw)

Hi,

I would like to use clang-format (with a pinned version, probably 14) to 
keep a consistent coding style, or at least start with one. However, 
there is some inconsistencies with the checkpatch.pl script:

In some cases, goto labels are indented, which checkpatch.pl doesn't like.

checkpatch.pl complains about some functions (e.g. FIXTURE or 
FIXTURE_VARIANT_ADD) that get an open brace just after but without a space.

I also noticed that there is some clang-format configuration lines that 
are commented because of incompatibilities with versions older than 6. 
Shouldn't we require a minimal version, at least the 6th?

About checkpatch.pl, it incorrectly warns about space between function 
name and open parenthesis for *for_each* functions (specifically 
interpreted as "for" statements in .clang-format, e.g. list_for_each_entry).

Regards,
  Mickaël

             reply	other threads:[~2022-04-23 11:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-23 11:45 Mickaël Salaün [this message]
2022-04-23 16:14 ` Miguel Ojeda
2022-05-02 10:29   ` Mickaël Salaün
2022-05-02 19:13 ` Mickaël Salaün

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=8b6b252b-47a6-9d52-f0bd-10d3bc4ad244@digikod.net \
    --to=mic@digikod.net \
    --cc=apw@canonical.com \
    --cc=dwaipayanray1@gmail.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=lukas.bulwahn@gmail.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=ojeda@kernel.org \
    --cc=trix@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

all inboxes | Powered by JetHome®