[coreboot-gerrit] Change in coreboot[master]: util/gitconfig: Refuse to commit on lint failure
Alex Thiessen (Code Review)
gerrit at coreboot.org
Fri Jan 5 06:42:04 CET 2018
Alex Thiessen has uploaded this change for review. ( https://review.coreboot.org/23130
Change subject: util/gitconfig: Refuse to commit on lint failure
......................................................................
util/gitconfig: Refuse to commit on lint failure
After running `lint-stable` in the pre-commit hook, its result is
ignored. This behavior was introduced in commit b18f522b
(lint/gitconfig: Enable checkpatch.pl checking of commits) and it
doesn't seem intentional. This issue was also mentioned in the revert
discussion (https://review.coreboot.org/c/coreboot/+/17440).
Enable `errexit` mode of the shell so that the hook fails when an error
occurs in any of the tests. Also, enable `nounset` mode to catch typos
easier.
Change-Id: I749963167660ea6a1a04d40a14ad1113e82f0f86
Signed-off-by: Alex Thiessen <alex.thiessen.de+coreboot at gmail.com>
---
M util/gitconfig/pre-commit
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/30/23130/1
diff --git a/util/gitconfig/pre-commit b/util/gitconfig/pre-commit
index 1c04bc3..2f2c568 100755
--- a/util/gitconfig/pre-commit
+++ b/util/gitconfig/pre-commit
@@ -1,4 +1,8 @@
#!/bin/sh
+
+set -o errexit
+set -o nounset
+
%MAKE% lint-stable
PATCHDIFF=$(git diff --cached)
--
To view, visit https://review.coreboot.org/23130
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: I749963167660ea6a1a04d40a14ad1113e82f0f86
Gerrit-Change-Number: 23130
Gerrit-PatchSet: 1
Gerrit-Owner: Alex Thiessen <alex.thiessen.de+coreboot at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180105/add131bc/attachment.html>
More information about the coreboot-gerrit
mailing list