[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 06/11] tools/ocaml: add .clang-format


  • To: Edwin Török <edvin.torok@xxxxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Mon, 19 Dec 2022 12:03:31 +0000
  • Authentication-results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Christian Lindig <christian.lindig@xxxxxxxxxx>, David Scott <dave@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Mon, 19 Dec 2022 12:03:45 +0000
  • Ironport-data: A9a23:jCkTHKw8QNIq5CfURfF6t+c7xirEfRIJ4+MujC+fZmUNrF6WrkUBy zFMDGuFOa3fZWHxfYolOozloEkO6JHcnYNiSVdvqSAxQypGp/SeCIXCJC8cHc8wwu7rFxs7s ppEOrEsCOhuExcwcz/0auCJQUFUjP3OHfykTbaeYUidfCc8IA85kxVvhuUltYBhhNm9Emult Mj75sbSIzdJ4RYtWo4vw//F+U0HUMja4mtC5AVkPKET5TcyqlFOZH4hDfDpR5fHatE88t6SH 47r0Ly/92XFyBYhYvvNfmHTKxBirhb6ZGBiu1IOM0SQqkEqSh8ai87XAME0e0ZP4whlqvgqo Dl7WT5cfi9yVkHEsLx1vxC1iEiSN4UekFPMCSDXXcB+UyQq2pYjqhljJBheAGEWxgp4KVhs3 94oEx48VAyoxPKQ57LlRNhdh+12eaEHPKtH0p1h5TTQDPJgSpHfWaTao9Rf2V/chOgXQ6yYP ZBAL2MyMlKQOHWjOX9OYH46tO6umnn4dSwesF+PrLA7y2PS0BZwwP7mN9+9ltmiFZQNwBnE9 j6uE2LRDhsQc4OHlmC/0FGR19SMp37pZ6QdG+jtnhJtqALKnTFCYPEMbnOkpdGph0j4XMhQQ 2QY8zQjhbI//0uqSp/6RRLQiG6JuFsQVsRdF8U+6RqR0ezE7gCBHG8GQzVdLts8u6cLqScCj wHT2YmzXHo27ePTGSn1GqqoQS2aAAo/D185Sx4+USBG8//EoN89vyPOZ4M2eEKqteHdFTb1y jGMiSExgbQPkMIGv5mGEUD7byGE/caQEFNsjunDdif8t14iOtb5D2C9wQKDhcusOrp1WbVoU JIsv8GFpN4DApiW/MBmaLVcRer5jxpp3dC1vLKOI3XD3272k5JAVdoKiN2bGKuOGphsRNMRS BWP0T69HbcKVJdQUYd5YpiqF+MhxrX6GNLuW5j8N4QRO8MhJFTZonE/NCZ8OlwBd2B1zckC1 WqzK57wXR7294w8pNZJewvt+eBynX1vrY8ibZv60w6mwdKjWZJhcp9caAHmRrlgvMu5TPD9r 4432z2il08OD4UTo0D/reYuELz9BSNiWMyu9JwPKr/rz8gPMDhJNsI9CIgJI+RN95m5XM+Sl p1hcie0EGbCuEA=
  • Ironport-hdrordr: A9a23:+Z1UsKxzFiwE6uSq9y/xKrPw2r1zdoMgy1knxilNoHxuH/BwWf rPoB17726TtN91YhsdcL+7V5VoLUmzyXcx2/hyAV7AZniAhILLFvAA0WKK+VSJdxEWtNQtsJ uIG5IUNDSaNykfsS+V2miF+9ZL+qj5zEir792usUuEm2tRGtBdBwQSMHfqLqVvLjM2fKbQjP Cnl7d6TzzLQwVuUu2LQkMrcsLkvNPxmJfvcXc9dmIaAFnnt0LS1FbieSLopCsjbw==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Fri, Dec 16, 2022 at 06:25:15PM +0000, Edwin Török wrote:
> Add a .clang-format configuration that tries to match CODING_STYLE where
> possible.

Is there going to be a patch applying this to "tools/ocaml", like you
did with "make format"?

> I was not able to express the special casing of braces after 'do'
> though, this can only be controlled generally for all control
> statements.
> It is imperfect, but should be better than the existing bindings, which
> do not follow Xen coding style.

There isn't a single CODING_STYLE for all code in the repo so it isn't
an issue if the binding where having a different coding style. But
having as few coding style as possible in the repo is probably helpful.

You could maybe add a CODING_STYLE in "tools/ocaml" to say that the
coding style is running `make format` or `clang-format ...`. And if
there other rules like how to name certain variable, that could go in
this file as well.


Cheers,

-- 
Anthony PERARD



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.