Hi, On Wed, 12 Apr 2023 20:27:25 -0500 Michael Catanzaro via webkit-dev <webkit-dev@lists.webkit.org> wrote: > 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.
That may have been the case because the conventions used for code style in GLib/GObject-adjacent projects is quite peculiar, and uncrustify allows for a bit more tweaking than clang-format (and even so I have seen some projects use additional scripts for the API headers, which have their own set of indentation challenges!). OTOH, clang-format supports the WebKit C++ coding conventions out of the box (“clang-format --style=WebKit”). > 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. Personally, I do not care that much which particular style checker is used, as long as there is a sanctioned style and some way of checking it. The current style checker is fine, and supports more languages than C/C++ so in that regard it's better than clang-format. Cheers, —Adrián
signature.asc
Description: PGP signature
_______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-dev