]> xenbits.xensource.com Git - xen.git/commitdiff
tools/ocaml: add 'make format' for OCaml files
authorEdwin Török <edvin.torok@citrix.com>
Fri, 2 Dec 2022 17:17:32 +0000 (17:17 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 6 Feb 2023 10:22:12 +0000 (10:22 +0000)
Using `ocp-indent` for now to just make minimal modifications in
tabs vs spaces and get the right indentation.

This avoids perpetuating a formatting style that is inconsistent with
the rest of Xen, and that makes preparing and submitting patches more
difficult (OCaml indentation tools usually only support spaces, not tabs).

No functional change.

Signed-off-by: Edwin Török <edvin.torok@citrix.com>
Acked-by: Christian Lindig <christian.lindig@citrix.com>
tools/ocaml/Makefile

index a7c04b65462a3b86925c33fc5f71dd7143e4beed..85bfd087c9c6d687a5ddef7bb72b4a0ff2577341 100644 (file)
@@ -34,3 +34,7 @@ build-tools-oxenstored:
        $(MAKE) -s -C libs/xb
        $(MAKE) -s -C libs/xc
        $(MAKE) -C xenstored
+
+.PHONY: format
+format:
+       git ls-files '*.ml' '*.mli' | xargs -n1 ocp-indent -i