From patchwork Wed Aug 7 12:15:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 20818 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 49060BE173 for ; Wed, 7 Aug 2024 12:15:47 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 84FC9633AC; Wed, 7 Aug 2024 14:15:45 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="i3NMd4+O"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 91C6463382 for ; Wed, 7 Aug 2024 14:15:42 +0200 (CEST) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id A928C2EC for ; Wed, 7 Aug 2024 14:14:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1723032889; bh=e4NiVPk/ydUmg51/rtVAR8NFaiyyxvy5h6QbQWAr5uc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=i3NMd4+OUy5qjNyERQ0nD91IWJTu8JWvhwy8/kZZq6aNLfdZLVQkcDN0gd0pXAYlB P2/qNvLxuYnNBzwQNmMTV8Evd4JCNSgmhav6MKU942QOJBHT4aVHdQ0RmdcGbb+vc7 jMJ5prnZIsJdwWqONjBmv3C4UXJNb79jotT2WeLw= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH v2 2/3] utils: checkstyle.py: Validate SoB trailer against author Date: Wed, 7 Aug 2024 15:15:15 +0300 Message-ID: <20240807121516.13608-3-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.44.2 In-Reply-To: <20240807121516.13608-1-laurent.pinchart@ideasonboard.com> References: <20240807121516.13608-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The TrailersChecker enforces the presence of a Signed-off-by tag in the trailer, but doesn't verify that the tag matches the commit's author. Add that verification, as required by the libcamera contribution process. Signed-off-by: Laurent Pinchart Reviewed-by: Stefan Klug Reviewed-by: Kieran Bingham --- utils/checkstyle.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/utils/checkstyle.py b/utils/checkstyle.py index e8451846c0c2..560a2c1e8c58 100755 --- a/utils/checkstyle.py +++ b/utils/checkstyle.py @@ -525,10 +525,11 @@ class TrailersChecker(CommitChecker): continue if key == 'Signed-off-by': - sob_found = True + if value == commit.author: + sob_found = True if not sob_found: - issues.append(CommitIssue(f"No valid 'Signed-off-by' trailer found, see Documentation/contributing.rst")) + issues.append(CommitIssue(f"No 'Signed-off-by' trailer matching author '{commit.author}', see Documentation/contributing.rst")) return issues