diff options
author | Edward O'Callaghan <eocallaghan@alterapraxis.com> | 2015-01-03 02:08:33 +1100 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-01-04 10:37:10 +0000 |
commit | 4139c15276a62c32c8d976c41782073379d64585 (patch) | |
tree | 1b4b2f0cf9629d72fc5ef62ee1f4f755cba8aaea /util/gitconfig/pre-commit | |
parent | d1584fb2502a5d4741cf3f97d6f572dffd1aea04 (diff) |
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 <eocallaghan@alterapraxis.com>
Reviewed-on: https://review.coreboot.org/c/8037
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'util/gitconfig/pre-commit')
-rwxr-xr-x | util/gitconfig/pre-commit | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/gitconfig/pre-commit b/util/gitconfig/pre-commit index 0644b7ff86..78b2509eba 100755 --- a/util/gitconfig/pre-commit +++ b/util/gitconfig/pre-commit @@ -18,7 +18,7 @@ set -e # -o errexit set -u # -o nounset -%MAKE% lint-stable +%MAKE% check-style lint-stable PATCHDIFF=$(git diff --cached --src-prefix=a/ --dst-prefix=b/) if printf "%s\n" "$PATCHDIFF" | grep -q "@@"; then |