From 4139c15276a62c32c8d976c41782073379d64585 Mon Sep 17 00:00:00 2001 From: Edward O'Callaghan Date: Sat, 3 Jan 2015 02:08:33 +1100 Subject: util/gitconfig/pre-commit: Use clang-format to sanitise commits Use the `git-format' tool to sanitise coreboot commits such that they conform to coreboot's coding style. This fancy piece of machinary allows one to have LibFormat from Clang to automatically check your commit conforms to coreboot's coding style, fix any issues automatically and provides you a diff you may review and apply at your convenience. N.B. When the `clang-format' binary is not found we issue a warning that the test was skipped and carry on as usual. Hence, this is strictly non-enforcing at this current time. You may use it at your leisure. Change-Id: If49017ea82f0707efd47cae5978a286a9af8f3b7 Signed-off-by: Edward O'Callaghan Reviewed-on: https://review.coreboot.org/c/8037 Reviewed-by: Patrick Georgi Reviewed-by: HAOUAS Elyes Tested-by: build bot (Jenkins) --- Makefile.inc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Makefile.inc') diff --git a/Makefile.inc b/Makefile.inc index b25ac6b426..2741b19ffa 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -83,7 +83,7 @@ files_added:: build_complete ####################################################################### # our phony targets -PHONY+= clean-abuild coreboot build-dirs build_complete +PHONY+= clean-abuild coreboot check-style build-dirs build_complete ####################################################################### # root source directories of coreboot @@ -606,6 +606,12 @@ printcrt0s: update: dongle.py -c /dev/term/1 $(obj)/coreboot.rom EOF +check-style: + grep "^# DESCR:" util/lint/check-style | sed "s,.*DESCR: *,," + echo "========" + util/lint/check-style + echo "========" + gitconfig: util/gitconfig/gitconfig.sh "$(MAKE)" -- cgit v1.2.3