From patchwork Tue Jul 11 13:39:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 18805 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 0AB20BDC71 for ; Tue, 11 Jul 2023 13:39:23 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 7EB4961E32; Tue, 11 Jul 2023 15:39:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1689082762; bh=9UOVENAlS0cgV1Nh69f6lmu/dpE1nxGnTg/e7DvAQs4=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=FkWIdBNxsZnNuxCesCa1xyU3r8x9uySzWweKBiwR5dP17ApVK0N8l862lbHgUWvni +DC7UtkocCmP++NcP/banqOweGk9Kk6zaJMrDHRYXb+xA+pnf3pyTpCOk12nPKpAAw 8nrvfpCNyAqypkfB1WgpygemWOcfzu21/1JOMfttBkoWy8sBQiGFEF0n+03yialybo DVbVHjCASNbJ7MAiJKi/I4fMLekPWZYGOJNN+zezv4pa+hqAyHEg44uX2ZoCL4LtyL WgP1myMibcCsjtPyjjh8xKVKpgTyQ0QYz9CPTHhBf0gq50E+3m+1gVhApPszLkNWe9 jkPG6CeDM2QdA== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 34E2C60570 for ; Tue, 11 Jul 2023 15:39:20 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="gR1CUUvS"; 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 1839C8CC; Tue, 11 Jul 2023 15:38:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1689082711; bh=9UOVENAlS0cgV1Nh69f6lmu/dpE1nxGnTg/e7DvAQs4=; h=From:To:Cc:Subject:Date:From; b=gR1CUUvSJz+ibR9DtjajN2xqtzQ73Q1aq9GLh+eJnAHvxBHuAXs1gZBhHLCYIdFhW 9x8aVNpUyVctsrRyD1K+21hoyrKXVLRYPmy+laphBNnQaFYL9K6SUaUcPD2XyJIpvr cQ3Gsz4sgTCbZKrA2aWTLorCQ5kmTvh4Jhl6p+EQ= To: libcamera devel Date: Tue, 11 Jul 2023 14:39:11 +0100 Message-Id: <20230711133915.650485-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/4] utils: checkstyle.py: Fix Trailer handling 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" Improve the handling of Trailer checking to support pre-commit hooks which will run using the 'StagedChanges' and 'Amendment' commit types. While there are no trailers to parse for StagedChanges, the existing trailers can be checked for Amendment commits. Update the code to support this, and also remove a RuntimeError from the checker which can be replaced with a usual CommitIssue instance. Kieran Bingham (4): utils: checkstyle.py: Treat Malformed trailers as a CommitIssue utils: checkstyle.py: Initialise staged trailers utils: checkstyle.py: Derive Amendment from Commit utils: checkstyle.py: Check trailers for Amendment commits utils/checkstyle.py | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) Tested-by: Jacopo Mondi