{"id":16106,"url":"https://patchwork.libcamera.org/api/patches/16106/?format=json","web_url":"https://patchwork.libcamera.org/patch/16106/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20220530072228.15916-1-tomi.valkeinen@ideasonboard.com>","date":"2022-05-30T07:22:28","name":"[libcamera-devel] utils: checkstyle.py: Fix color bleed","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"ce1fc0d3bade75b315ac7a1cc402be8b4e93862e","submitter":{"id":109,"url":"https://patchwork.libcamera.org/api/people/109/?format=json","name":"Tomi Valkeinen","email":"tomi.valkeinen@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/16106/mbox/","series":[{"id":3148,"url":"https://patchwork.libcamera.org/api/series/3148/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3148","date":"2022-05-30T07:22:28","name":"[libcamera-devel] utils: checkstyle.py: Fix color bleed","version":1,"mbox":"https://patchwork.libcamera.org/series/3148/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/16106/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/16106/checks/","tags":{},"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 59120BD161\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 30 May 2022 07:22:48 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8E3A065634;\n\tMon, 30 May 2022 09:22:47 +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 359EC61FB7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 30 May 2022 09:22:46 +0200 (CEST)","from deskari.lan (91-156-85-209.elisa-laajakaista.fi\n\t[91.156.85.209])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 7ADF96DF;\n\tMon, 30 May 2022 09:22:45 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1653895367;\n\tbh=uZ1Yx+K+q6YMTAAVXS5gc3FfnIEmrOy2rcTKN2K9ENI=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:From;\n\tb=hc4UWfePZfX9TXdrF0HXLo5aPbM+/ARneuLRbgcFrTy42/SFBmsi0JY92+8VWBZmb\n\tV/Zrlfln73MPICH9BQc0VbUfIfrEQTRVbyYS0GPhjN2P3hJAnBuGXYLI62Cs/yNaBR\n\tlQ12D7npYKPQzCjrbUW+h0A3kA6u/4lElBnMCIrYGo9nRcqcd9C1vwRvN5i9LD0vy8\n\tWi8Qh2AGN8bwOKJSvLBG0V6+vPn2B0v5Oz8wTQmOwi/zkHi1fUZgKwwcy5t8T1Olta\n\tP/gi7APRCuoa345XOHlX4g+drRC5NPSvYZi7dxC1VZMfRltdYm+9/Xj0Zx9k1J0l9g\n\tNKvmDvjj8Su1w==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1653895365;\n\tbh=uZ1Yx+K+q6YMTAAVXS5gc3FfnIEmrOy2rcTKN2K9ENI=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=XAsqcpAimjeMb3wyIerLtQfWwzRs4uF1bYQtazG795nb2Q6LOFTRMIJunizLYRuc+\n\tDJJ1idDHhqFtk4gYoBduzgaSiWQrv1Df8dzpDu/gG9H4si812sEk08gehX+/Xlxwoi\n\tKq0+t1tSjN+OmBthGRoNethkmlgUAdxKXw9/DdXw="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"XAsqcpAi\"; dkim-atps=neutral","To":"libcamera-devel@lists.libcamera.org,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>","Date":"Mon, 30 May 2022 10:22:28 +0300","Message-Id":"<20220530072228.15916-1-tomi.valkeinen@ideasonboard.com>","X-Mailer":"git-send-email 2.34.1","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH] utils: checkstyle.py: Fix color bleed","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":"Tomi Valkeinen via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"If issue.line is None, the the terminal color is never reset back to\nnormal. This causes the yellow color to bleed.\n\nSigned-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>\n---\n utils/checkstyle.py | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)","diff":"diff --git a/utils/checkstyle.py b/utils/checkstyle.py\nindex 835f2a9f..fa0513f2 100755\n--- a/utils/checkstyle.py\n+++ b/utils/checkstyle.py\n@@ -743,9 +743,9 @@ def check_file(top_level, commit, filename):\n     if len(issues):\n         issues = sorted(issues, key=lambda i: i.line_number)\n         for issue in issues:\n-            print('%s#%u: %s' % (Colours.fg(Colours.Yellow), issue.line_number, issue.msg))\n+            print('%s#%u: %s%s' % (Colours.fg(Colours.Yellow), issue.line_number, issue.msg, Colours.reset()))\n             if issue.line is not None:\n-                print('+%s%s' % (issue.line.rstrip(), Colours.reset()))\n+                print('%s+%s%s' % (Colours.fg(Colours.Yellow), issue.line.rstrip(), Colours.reset()))\n \n     return len(formatted_diff) + len(issues)\n \n","prefixes":["libcamera-devel"]}