misc: Added a clang-tidy Makefile target so enforcing the formatting is easier
This commit is contained in:
parent
0e184c7b98
commit
3a02fdea9d
5
Makefile
5
Makefile
|
@ -33,4 +33,7 @@ endif
|
||||||
clang-tidy:
|
clang-tidy:
|
||||||
$(Q)scripts/run-clang-tidy.py -s "$(PWD)"
|
$(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
|
||||||
|
|
|
@ -128,7 +128,7 @@ ifndef PC_HOSTED
|
||||||
$(Q)$(OBJCOPY) -O ihex $^ $@
|
$(Q)$(OBJCOPY) -O ihex $^ $@
|
||||||
endif
|
endif
|
||||||
|
|
||||||
.PHONY: clean host_clean all_platforms FORCE
|
.PHONY: clean host_clean all_platforms clang-format FORCE
|
||||||
|
|
||||||
clean: host_clean
|
clean: host_clean
|
||||||
$(Q)echo " CLEAN"
|
$(Q)echo " CLEAN"
|
||||||
|
@ -191,4 +191,7 @@ else
|
||||||
fi
|
fi
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
clang-format:
|
||||||
|
$(Q)clang-format -i *.c */*.c */*/*.c *.h */*.h */*/*.h
|
||||||
|
|
||||||
-include *.d
|
-include *.d
|
||||||
|
|
Loading…
Reference in New Issue