From aad8c1276cbe21b1306b32899e19875ca015267e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= Date: Fri, 2 Dec 2022 17:17:32 +0000 Subject: [PATCH] tools/ocaml: add 'make format' for OCaml files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Acked-by: Christian Lindig --- 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