From 3f82f502275c3a1760c11a277b9303355de1fd21 Mon Sep 17 00:00:00 2001 From: Kieran Bingham Date: Tue, 22 Jan 2019 19:28:21 +0000 Subject: 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 Signed-off-by: Kieran Bingham --- utils/hooks/post-commit | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 utils/hooks/post-commit (limited to 'utils') 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 -- cgit v1.2.1