summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2019-01-22 19:28:21 +0000
committerKieran Bingham <kieran.bingham@ideasonboard.com>2019-01-30 10:57:37 +0000
commit3f82f502275c3a1760c11a277b9303355de1fd21 (patch)
tree5906a827ff36629f709527f94e50f8833ef91ab8 /utils
parentba8da0f2fcd087ac7a132eaa12d2ffc4083eb591 (diff)
utils: hooks: Provide post-commit hook example to checkstyle.py
Provide an example post-commit hook which a developer can install, ensuring that every commit gets the style checker executed on it. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'utils')
-rwxr-xr-xutils/hooks/post-commit11
1 files changed, 11 insertions, 0 deletions
diff --git a/utils/hooks/post-commit b/utils/hooks/post-commit
new file mode 100755
index 00000000..c8b1739a
--- /dev/null
+++ b/utils/hooks/post-commit
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+# Execute the checkstyle script after committing any code. This allows the
+# commit to succeed, but ensures that the developer is aware of any potential
+# issues immediately, and can resolve them and fix rapidly with:
+# git commit --amend
+#
+# To utilise this hook, install this file with:
+# cp utils/hooks/post-commit .git/hooks/post-commit
+
+./utils/checkstyle.py