[libcamera-devel] [PATCH] utils: hooks: Provide post-commit hook example to checkstyle.py
Kieran Bingham
kieran.bingham at ideasonboard.com
Tue Jan 22 20:29:30 CET 2019
Provide an example post-commit hook which a developer can install, ensuring
that every commit gets the style checker executed on it.
Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
---
utils/hooks/post-commit | 11 +++++++++++
1 file changed, 11 insertions(+)
create mode 100755 utils/hooks/post-commit
diff --git a/utils/hooks/post-commit b/utils/hooks/post-commit
new file mode 100755
index 000000000000..e992428b11ae
--- /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 to:
+# .git/hooks/post-commit
+
+./utils/checkstyle.py
--
2.17.1
More information about the libcamera-devel
mailing list