From patchwork Tue Jan 22 19:29:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 329 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id DDCBD60C7D for ; Tue, 22 Jan 2019 20:29:34 +0100 (CET) Received: from localhost.localdomain (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 53339575; Tue, 22 Jan 2019 20:29:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1548185374; bh=SRdwtRaS3vbbGCrBWdz9U4fGqYrympMzFHMOtX6WsNs=; h=From:To:Cc:Subject:Date:From; b=WZU6O7Jp7j+QHQh3k8ClDwy1Ya7SKFpDkePJ5GlPaP/6j0S1Bm6LM5LqK5lQ0GOE3 9Bzw3Uzmth7nUYZfBp8k9Hkq0yjgAH5r6x2RIFaIDDds75y2IAkS8t8veCiPJ8UhOU djPS/tcGN4h7LluQFZbHKQ8U+6zV8VfmbZYXt0Zg= From: Kieran Bingham To: LibCamera Devel Date: Tue, 22 Jan 2019 19:29:30 +0000 Message-Id: <20190122192930.10540-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.17.1 Subject: [libcamera-devel] [PATCH] utils: hooks: Provide post-commit hook example to checkstyle.py X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jan 2019 19:29:35 -0000 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 Reviewed-by: Laurent Pinchart --- 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