misc: Added a clang-tidy Makefile target so enforcing the formatting is easier

This commit is contained in:
dragonmux 2022-06-26 03:11:47 -04:00 committed by Piotr Esden-Tempski
parent 0e184c7b98
commit 3a02fdea9d
2 changed files with 8 additions and 2 deletions

View File

@ -33,4 +33,7 @@ endif
clang-tidy:
$(Q)scripts/run-clang-tidy.py -s "$(PWD)"
.PHONY: clean all_platforms clang-tidy
clang-format:
$(Q)$(MAKE) $(MFLAGS) -C src $@
.PHONY: clean all_platforms clang-tidy clang-format

View File

@ -128,7 +128,7 @@ ifndef PC_HOSTED
$(Q)$(OBJCOPY) -O ihex $^ $@
endif
.PHONY: clean host_clean all_platforms FORCE
.PHONY: clean host_clean all_platforms clang-format FORCE
clean: host_clean
$(Q)echo " CLEAN"
@ -191,4 +191,7 @@ else
fi
endif
clang-format:
$(Q)clang-format -i *.c */*.c */*/*.c *.h */*.h */*/*.h
-include *.d