[{"id":27535,"web_url":"https://patchwork.libcamera.org/comment/27535/","msgid":"<8b9affae-a8cc-0814-03f5-1a777d8885b6@ideasonboard.com>","date":"2023-07-11T13:48:06","subject":"Re: [libcamera-devel] [PATCH 1/4] utils: checkstyle.py: Treat\n\tMalformed trailers as a CommitIssue","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hi Kieran,\n\nThanks for the patch.\n\nOn 7/11/23 7:09 PM, Kieran Bingham via libcamera-devel wrote:\n> If a Malformed trailer is identified the checkstyle script triggers a\n> RuntimeError and stops processing the rest of the commit.\n>\n> A malformed trailer can be regarded as an issue in the commit and\n> reported as such using the same method as other faults identified by the\n> tool.\n>\n> Convert the RuntimeError into a CommitIssue and continue processing\n> other trailers.\n>\n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n\n> ---\n>   utils/checkstyle.py | 3 ++-\n>   1 file changed, 2 insertions(+), 1 deletion(-)\n>\n> diff --git a/utils/checkstyle.py b/utils/checkstyle.py\n> index 3558740d389d..5a1268064d31 100755\n> --- a/utils/checkstyle.py\n> +++ b/utils/checkstyle.py\n> @@ -479,7 +479,8 @@ class TrailersChecker(CommitChecker):\n>           for trailer in commit.trailers:\n>               match = TrailersChecker.trailer_regex.fullmatch(trailer)\n>               if not match:\n> -                raise RuntimeError(f\"Malformed commit trailer '{trailer}'\")\n> +                issues.append(CommitIssue(f\"Malformed commit trailer '{trailer}'\"))\n> +                continue\n>   \n>               key, value = match.groups()\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id B0BF4BDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 11 Jul 2023 13:48:12 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2437E61E32;\n\tTue, 11 Jul 2023 15:48:12 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6276160570\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 11 Jul 2023 15:48:10 +0200 (CEST)","from [192.168.1.108] (unknown [103.251.226.37])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 216318CC;\n\tTue, 11 Jul 2023 15:47:20 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1689083292;\n\tbh=O0bONSue6uPp+Kd0gjUYmt7/XxT/mEhesA6ySxC0PmA=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=pa40QU+phn6zakG8idEFO4S2x5wT4v4ecuBsJYRxW43WZECbRpPWWjA5pJveCAAeg\n\ttBZLtQOdM0ww6ZiwR9kIFnmSfDrzCb4WcIO1iFDpI6Q7CLWFDpsKk1FsUsUGswyMbH\n\tafFovb6P4IyyXen0aWBKGd0ZaG3zezpS0GyG9QLIBf3hVuf6IOjK37ZndK7m0QjSzH\n\tiLK4g4CwLqnuEbk+gJzOI9tpFC2Yr5m/nUZRgKG/Ak5jE3lXVWE654uaNTfug7vyjW\n\tNIGMWqANRilHV97SQq1FhBjAJ/eiSgL+iLFtA8R6b8Bh90KHZcZlQwtsByGgkrCbGb\n\tr4tVOXIkQg7zg==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1689083241;\n\tbh=O0bONSue6uPp+Kd0gjUYmt7/XxT/mEhesA6ySxC0PmA=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=lXu6/6yh1s3zXTNB+qikOsh+92760UJ5Sq9hr9xA5vsy9zIVK96L00jdLZpUQQU6k\n\tGh+w+aFQ1PQS43+OxTDf8kXMisBbz8iJSdOMIRbyaTriqyCD033yLsztoehP9ncHZB\n\t4FSP564Y5PuxdO/OA00JD8b+xVwNydrJChtVabLs="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"lXu6/6yh\"; dkim-atps=neutral","Message-ID":"<8b9affae-a8cc-0814-03f5-1a777d8885b6@ideasonboard.com>","Date":"Tue, 11 Jul 2023 19:18:06 +0530","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101\n\tThunderbird/102.7.1","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tlibcamera devel <libcamera-devel@lists.libcamera.org>","References":"<20230711133915.650485-1-kieran.bingham@ideasonboard.com>\n\t<20230711133915.650485-2-kieran.bingham@ideasonboard.com>","Content-Language":"en-US","In-Reply-To":"<20230711133915.650485-2-kieran.bingham@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH 1/4] utils: checkstyle.py: Treat\n\tMalformed trailers as a CommitIssue","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Umang Jain via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Umang Jain <umang.jain@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]