Re: clang-format inconsistencies with checkpatch.pl

From: Mickaël Salaün
Date: Mon May 02 2022 - 15:12:00 EST



On 23/04/2022 13:45, Mickaël Salaün wrote:
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.

This can be fixed with SplitEmptyFunction: false. I'll send a patch for that if it's OK with you.


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

Miguel, do you know how/if clang-format can enforce that style? FIXTURE macros are struct declarations though.