Re: [PATCH] netfilter: conntrack: fix -Wformat

From: Miguel Ojeda
Date: Thu Dec 03 2020 - 08:45:08 EST


On Thu, Dec 3, 2020 at 8:26 AM Lukas Bulwahn <lukas.bulwahn@xxxxxxxxx> wrote:
>
> It is not a competition between checkpatch and clang-format, but if it would be:

Please note that clang-tidy is a different tool, it is designed to
write lints based on the AST rather than formatting.

> But jokes aside: Dwaipayan Ray, a mentee Joe and I are working with,
> has already submitted a patch to checkpatch that identifies those
> patterns and provides a fix:
>
> https://lore.kernel.org/lkml/20201128200046.78739-1-dwaipayanray1@xxxxxxxxx/

That is very good! However, it does not hurt to have it repeated in
clang-tidy too: it is a very good thing to have a full C parser behind
when writing lints!

Cheers,
Miguel