[coreboot-gerrit] Change in coreboot[master]: util/gitconfig: Make checkpatch non fatal in pre-commit hook

Martin Roth (Code Review) gerrit at coreboot.org
Wed Jul 18 17:41:33 CEST 2018


Martin Roth has uploaded this change for review. ( https://review.coreboot.org/27534


Change subject: util/gitconfig: Make checkpatch non fatal in pre-commit hook
......................................................................

util/gitconfig: Make checkpatch non fatal in pre-commit hook

We don't block commits for failing checkpatch in gerrit, and we
shouldn't block them here.  This allows checkpatch to still run, so
users can see the issues, but won't prevent the commit.

Adds a delay if checkpatch fails so that the issues can be seen.

Change-Id: Ibd4e8bb74e0b02825dcdf16e233a061c4bb43f50
Signed-off-by: Martin Roth <martin at coreboot.org>
---
M util/gitconfig/pre-commit
1 file changed, 2 insertions(+), 1 deletion(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/27534/1

diff --git a/util/gitconfig/pre-commit b/util/gitconfig/pre-commit
index 027eec0..0644b7f 100755
--- a/util/gitconfig/pre-commit
+++ b/util/gitconfig/pre-commit
@@ -24,5 +24,6 @@
 if printf "%s\n" "$PATCHDIFF" | grep -q "@@"; then
 	echo
 	echo "Running checkpatch"
-	printf "%s\n" "$PATCHDIFF" | util/lint/lint-007-checkpatch diff
+	printf "%s\n" "$PATCHDIFF" | util/lint/lint-007-checkpatch diff \
+		|| (echo "Please consider fixing these issues." ;sleep 5) ; true
 fi

-- 
To view, visit https://review.coreboot.org/27534
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibd4e8bb74e0b02825dcdf16e233a061c4bb43f50
Gerrit-Change-Number: 27534
Gerrit-PatchSet: 1
Gerrit-Owner: Martin Roth <martinroth at google.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180718/f871decf/attachment.html>


More information about the coreboot-gerrit mailing list