From patchwork Mon Jul 10 17:31:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 18804 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 68695BDC71 for ; Mon, 10 Jul 2023 17:31:58 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 9D5FF628BF; Mon, 10 Jul 2023 19:31:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1689010317; bh=3oro3YuTbBTosOH3fRf95lpmTr9W6BmKT18BkGWN9JY=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=wZawVaQNx5a6BbvK3JJUmlJorCsdmvXGAGZdgPu99Fvv34vBJilnxWiyeMGa3usOu OFdlvQm7vSMEYhSbeMqX5VNn0y6QLo4iQ/FHHEE6cT/4E/AuDWHO8BD58lKzOudZzD zrGuzZp1BxCp5p8OrEIcLV0IDhVZRktNq5QvgqwrH7KDFPpS2ecBMx/n0soramIf+8 6VwNuvsHHGJV2PUgkJl71vgOYsPPTJj3+HZqFlP+rC5pvkaBVwA3d6VMfGN2HIA+0W 10BRvqaNWZZPrrgCO8F1OlEfZvsTtDHXj8Ur31fEIOERy8ePSREFnUhQe0jy6NsWua +aQ40lJDJqPJw== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D421760384 for ; Mon, 10 Jul 2023 19:31:55 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="K1wGNP9H"; dkim-atps=neutral Received: from Monstersaurus.local (aztw-30-b2-v4wan-166917-cust845.vm26.cable.virginm.net [82.37.23.78]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 65307BEB; Mon, 10 Jul 2023 19:31:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1689010267; bh=3oro3YuTbBTosOH3fRf95lpmTr9W6BmKT18BkGWN9JY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K1wGNP9HyiBCm+jqzA+l4h3s41knuxN8pyjyw379hG4QpJ7ZQPzr5JFmW4PKB/VAv jgIiwesoYi5NeDhMcfbW5SD+ASMuLFL3HyvcJFE3akr0tb0kamKYRScDbY8l/Kap9W lO5Vzn7R7UGG/H3bQTJZ38o6yxmFbjM63ydQ28Bc= To: libcamera devel Date: Mon, 10 Jul 2023 18:31:46 +0100 Message-Id: <20230710173146.4287-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230612224751.4437-5-laurent.pinchart@ideasonboard.com> References: <20230612224751.4437-5-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] DNI: utils: checkstyle.py: Initialise trailers X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Kieran Bingham via libcamera-devel From: Kieran Bingham Reply-To: Kieran Bingham Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The commit trailers are checked as part of processing the commit message with the newly introduced TrailersChecker. This relies on the trailers property being correctly exposed by the Commit object, and is implemented for the base Commit. Ensure it's initialised for all Commits. This is a temporary solution, as it doesn't solve for Amended commits. Signed-off-by: Kieran Bingham --- Hi Naush, This will solve your issue in the short term - but I'm trying to make a proper fix that will also still do the trailer checks for Amended commits, but not Staged commits. utils/checkstyle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/checkstyle.py b/utils/checkstyle.py index 8242314c1bb5..18a68d2cf33c 100755 --- a/utils/checkstyle.py +++ b/utils/checkstyle.py @@ -206,6 +206,7 @@ class CommitFile: class Commit: def __init__(self, commit): self.commit = commit + self._trailers = [] self._parse() def _parse(self): @@ -217,7 +218,6 @@ class Commit: self._title = lines[0] - self._trailers = [] for index in range(1, len(lines)): line = lines[index] if not line: