Re: [GIT PULL] clang-format for v5.3-rc8

From: Miguel Ojeda
Date: Wed Sep 04 2019 - 20:06:03 EST


On Thu, Sep 5, 2019 at 1:35 AM Joe Perches <joe@xxxxxxxxxxx> wrote:
>
> It's a long, long list.
>
> $ git grep -P -h '^\s*#\s*define\s+\w*for_each\w*' | \
> grep -P -oh '\w+for_each\w*' | sort | uniq | wc -l
> 491
>
> Isn't there some way to regexes or automate this?
>
> Maybe just:
> $ git grep -P -h '^\s*#\s*define\s+\w*for_each\w*' | \
> grep -P -oh '\w+for_each\w*' | sort | uniq > somefile...

The command I use is in the file, I re-run it every once in a while.
Ideally we could run this somehow automatically every -rc (for
instance), e.g. Linus could have it in his release script or something
like that, or maybe at the end of the merge window.

Even being more idealistic, clang-format could somehow do this itself
keeping a cache somewhere.

Cheers,
Miguel