I checked the clang-format result of WTF.
$ find Source/WTF -name '*.h' -o -name '*.cpp' -exec clang-format -i '{}' ';'
Although it doesn't comply with the current WebKit style, it looks good enough to me.
By adopting clang-format for the project, we can forget most parts of WebKit style guidelines.
It can reduce the memory footprint for WebKit contributors.
However, inline asm are formatted badly, we should disable it for them.
// clang-format off
(..)
// clang-format on
On Thu, Apr 13 2023 at 08:15:00 AM +0900, Tetsuharu Ohzeki via
webkit-dev <webkit-dev@lists.webkit.org> wrote:
> To digress a little, why does webkit now use a style checker based on
> python script instead of clang-format?
> In today, I feel it's more reasonable to use such a formetter.
We've tried clang-format in several GNOME projects with not great
results. I'd recommend uncrustify instead.
Still, I'm not sure it's a good idea for WebKit. I'm sure we could make
either tool work, but we'd have to be very lax with any configuration
we use, or it could get pretty annoying. And the existing style checker
works decently enough.
_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev