lkml.org 
[lkml]   [2020]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] netfilter: conntrack: fix -Wformat
On Thu, Dec 3, 2020 at 2:44 PM Miguel Ojeda
<miguel.ojeda.sandonis@gmail.com> wrote:
>
> On Thu, Dec 3, 2020 at 8:26 AM Lukas Bulwahn <lukas.bulwahn@gmail.com> 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@gmail.com/
>
> 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!
>

Completely agree. A regular expression is only a limited (but quite
powerful) heuristics to a full C parser :)

... and it did a good job in the case here.

Lukas

> Cheers,
> Miguel

\
 
 \ /
  Last update: 2020-12-03 15:42    [W:0.151 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site