From ff1c9962bad574fa550a366774d396ec6696c641 Mon Sep 17 00:00:00 2001 From: Alexander Bandukwala <7h3kk1d@gmail.com> Date: Wed, 21 Aug 2024 11:32:01 -0400 Subject: [PATCH] Run dune fmt before dev and test without failure - dune fmt returns a non-zero exit code if autoformatting promotion happens - So this will run the dune fmt auto-promote and ignore the exit code then run the standard build in dev so you don't have to run make twice - Release is left unchanged since we want the build to fail on invalid formatting --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 82d19880e7..f777d40ded 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,8 @@ setup-instructor: setup-student: cp src/haz3lweb/ExerciseSettings_student.re src/haz3lweb/ExerciseSettings.re -dev-helper: +dev-helper: + dune fmt --auto-promote || true dune build @src/fmt --auto-promote src --profile dev dev: setup-instructor dev-helper @@ -58,6 +59,7 @@ repl: dune utop src/haz3lcore test: + dune fmt --auto-promote || true dune build @src/fmt @test/fmt --auto-promote src test --profile dev node $(TEST_DIR)/haz3ltest.bc.js