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

[xen master] tools/ocaml: add 'make format' for OCaml files



commit aad8c1276cbe21b1306b32899e19875ca015267e
Author:     Edwin Török <edvin.torok@xxxxxxxxxx>
AuthorDate: Fri Dec 2 17:17:32 2022 +0000
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Mon Feb 6 10:22:12 2023 +0000

    tools/ocaml: add 'make format' for OCaml files
    
    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@xxxxxxxxxx>
    Acked-by: Christian Lindig <christian.lindig@xxxxxxxxxx>
---
 tools/ocaml/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/ocaml/Makefile b/tools/ocaml/Makefile
index a7c04b6546..85bfd087c9 100644
--- a/tools/ocaml/Makefile
+++ b/tools/ocaml/Makefile
@@ -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
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

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