Re: [PATCH v2 02/11] kcov: apply clang-format to kcov code
From: Miguel Ojeda
Date: Sun Jun 29 2025 - 15:25:54 EST
On Fri, Jun 27, 2025 at 2:50 PM Alexander Potapenko <glider@xxxxxxxxxx> wrote:
>
> Random fact that I didn't know before: 1788 out of 35503 kernel .c
> files are already formatted according to the clang-format style.
> (I expected the number to be much lower)
Nice :)
> I think we can fix this by setting AllowShortFunctionsOnASingleLine:
> Empty, SplitEmptyFunction: false in .clang-format
>
> Miguel, do you think this is a reasonable change?
I have a few changes in the backlog for clang-format that I hope to
get to soon -- the usual constraints are that the options are
supported in all LLVMs we support (there are some options that I have
to take a look into that weren't available back when we added the
config), and to try to match the style of as much as the kernel as
possible (i.e. since different files in the kernel do different
things).
Cheers,
Miguel