From 6d0cf58f998d6e2888cac2c628fcddba4a60d9f2 Mon Sep 17 00:00:00 2001 From: omniscient <17525998+omnisci3nce@users.noreply.github.com> Date: Fri, 18 Oct 2024 00:29:11 +1100 Subject: add format-check make target --- Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index afa79ed..8dc73e2 100644 --- a/Makefile +++ b/Makefile @@ -92,10 +92,18 @@ cube: $(EXAMPLES_DIR)/cube.c $(SHARED_LIB) $(SHADER_OUT_DIR)/cube.air $(METAL_LI format: clang-format -i $(FORMAT_FILES) -.PHONY: tidy +.PHONY: format-check +format-check: + clang-format --dry-run -Werror $(FORMAT_FILES) + +.PHONY: tidy-fix tidy: clang-tidy -fix $(SRCS) $(EXAMPLES_DIR)/*.c -- $(CFLAGS) +.PHONY: tidy-check +tidy-check: + clang-tidy $(SRCS) $(EXAMPLES_DIR)/*.c -- $(CFLAGS) + .PHONY: clean clean: rm -rf $(BUILD_DIR) -- cgit v1.2.3-70-g09d2