From patchwork Thu Jul 18 10:15:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tamar Christina X-Patchwork-Id: 1962064 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=FVpSigU6; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=FVpSigU6; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WPpbk6MKvz1ySl for ; Thu, 18 Jul 2024 20:15:46 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BF873385ED4C for ; Thu, 18 Jul 2024 10:15:42 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on20630.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e1a::630]) by sourceware.org (Postfix) with ESMTPS id A58013858D28 for ; Thu, 18 Jul 2024 10:15:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A58013858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A58013858D28 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f400:7e1a::630 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1721297722; cv=pass; b=KwU3EE78crGA6ge2ielraO5sk1Tm3YZjV5GPJqbuVuriX6YAT/OXl4HkwJVy9OlTMqTbOESdknlKOYZ08TSlwIxW1YEf2SZ4av+9JwWD05/PaMuFq5JXLI2amSPuBkfQmt5YZ1YnFz3WE+wR8HXgslAFZNE/AAbnEe2gtqMk78Y= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1721297722; c=relaxed/simple; bh=wflbVkoPOv7IQlTPBLoVCinAYSRzyJuB52DJy/Ib7wM=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:Message-ID: MIME-Version; b=LAkCrDMIvydAaorGz64w5Hj2e/sKToZsq4Wi19wLhxfNWpmoRS1EzB3WRz9+TokSzceDFV3KWvl5DWzf9MSQ8DdvK599qOBrN2yiANeOxHeOAtyUfktsFGfTrpfpUnkkjks+CsdlsJxVavB3KvWmkMT1lZp0mymmQJrgdIKTQKc= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=grgFADScRekb7C4KZTIaQ/pFbBUcWtl4TTf4zAh2gjUmy9F0lpTAL5rEPLqaSJDDWxTCKUqYHnv1cjP/IKVaKvx5WPPvLnjZMlWcXsMubs+6fLMaMT1bj5vGG8tp54h84Z+MytJ91tgioPwnfzsMTiuIjfkiddnn2X5yGmCdygyHW+LXhdQ6TkJdBoGim539KN6h78qo0WyI9A2b4vz9B47h0c0sncL1eexGfcxvCWruF618ryTgu4LqJWYkoFfpbaMyZS+VPyiY00WHF54yzsGbp6FwhxUHewtLo6mmH1rIkLd7zFgxyrscbdh6TtgeVrkYlZxQ1jxOC8DgUwshiQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7mR2H4NWtZ0uoFDBbWUc/evqLmS37z7iGgMChqOMfEo=; b=oC/XC1xBspZ0+UIAWh9cvnI9kNB1JnDIL3YLpIwEIcThBEmKPl2NUzduMIMm/yg0Ml/f7Upz7ZU5X8PyfahYUXRE6FyQCiA4Wju7l9/aqkP/sULzCmgmM2buURYIJvLMbssUOev8HFeVfEjyDGc5CH3bzirZXfJJ8/70I9lxuw/XLVB2r0xR7dJkRfo024ii4p6CCXgtvjDplDYd1D96uQOPLUpZm/xPyz51y+zeknLNuya59ZTiHtkRE19dfMfh6je9Bv2ofjoLh4DNrcae0TkJ5aZXuAnhNurS7tNy93nCgmv/kHflN0uU7WhDQ3nE+tE9RQ8VZBVbJFpBpzdCVw== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7mR2H4NWtZ0uoFDBbWUc/evqLmS37z7iGgMChqOMfEo=; b=FVpSigU6Lcd01BVKGxTNRLkyiqPdbw3cgA2se9Gi1zTkq77RJgvJIZ7BXenh+60ZgjsDcNzJvi/iK7Th6Hd/d1zf0aiWRIxmD5dGLc5jN/ysfapaFDw6eO/9W380JBCzGkc0SbTWZhJ1suyaHUcDJPyabL+NKikc/qldYZzcWdg= Received: from AS9PR06CA0645.eurprd06.prod.outlook.com (2603:10a6:20b:46f::17) by PAVPR08MB9037.eurprd08.prod.outlook.com (2603:10a6:102:325::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.29; Thu, 18 Jul 2024 10:15:16 +0000 Received: from AMS1EPF0000004D.eurprd04.prod.outlook.com (2603:10a6:20b:46f:cafe::c2) by AS9PR06CA0645.outlook.office365.com (2603:10a6:20b:46f::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.16 via Frontend Transport; Thu, 18 Jul 2024 10:15:16 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=arm.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AMS1EPF0000004D.mail.protection.outlook.com (10.167.16.138) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.7784.11 via Frontend Transport; Thu, 18 Jul 2024 10:15:16 +0000 Received: ("Tessian outbound ca5638866b89:v365"); Thu, 18 Jul 2024 10:15:16 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 1f9c49ca267136c6 X-CR-MTA-TID: 64aa7808 Received: from L8a66dadbfffb.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 66CCDD15-BAFE-4C4D-B554-86E389F06939.1; Thu, 18 Jul 2024 10:15:08 +0000 Received: from EUR03-DBA-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id L8a66dadbfffb.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 18 Jul 2024 10:15:08 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=k0HgoCm1QOWFHxn/bZG8Gx9DiG0pl0WNBa4ZoDr8giHZO5hh9JmZlEjFtgnUfFB+TwkII+nCl5YGKsSKm7QxdIM/ZQaWUTcd2iwWQT046LatPi28Ep7WUpgGiKVrknlECGTzMiEzln+5JjoogEKHNn+l9tJ01I07py5pRUMUJCw5qmuZQ66IFIHpmt9DZ8DYJmcKi9W2xdHzzMtcBQZ9l/JV0I9EqAbAoLhN+yeZ188uhmgsmR2FAJ88KBnsgDXgWEVJNqN0os0CtvzdkaEeLerMCLlgun9ot8p+oWYHAMKwaOuC1xlu5hXge4sHZtGzEM487M5irXwZxlDCUZitJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7mR2H4NWtZ0uoFDBbWUc/evqLmS37z7iGgMChqOMfEo=; b=ck5r+u82vNzTWjDzJy3mchR3ylFxGqA5/LtlBLRs3nnV5jVhCM/2cxkCAOLwTzVx1/5F6RrpRVvKfr6fq4MCiXRYjZ14TVblNeQWwP1wFLNIwH/JElZ6sPQ/iV1enGqMIzrb6LthxOx2PESTjWxpsIGijsIkR3FCYQfsMjRt/SLfs8703/YLdZvOl3XCzuYZXLR70qKCliwNQKVSRyF/V2T+ezhp728pTAie/PEixdVR8/SGTIsOdJH48iuD8z50hX1Z31HkiRSPvNq0+2zE5BcBKvNVa0zxAueQKGh4scHKM1O95cCwTz/N9eqRxkSx4Kht8VoYXE0BNqLfqEeK8g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7mR2H4NWtZ0uoFDBbWUc/evqLmS37z7iGgMChqOMfEo=; b=FVpSigU6Lcd01BVKGxTNRLkyiqPdbw3cgA2se9Gi1zTkq77RJgvJIZ7BXenh+60ZgjsDcNzJvi/iK7Th6Hd/d1zf0aiWRIxmD5dGLc5jN/ysfapaFDw6eO/9W380JBCzGkc0SbTWZhJ1suyaHUcDJPyabL+NKikc/qldYZzcWdg= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) by PAWPR08MB9662.eurprd08.prod.outlook.com (2603:10a6:102:2e9::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.18; Thu, 18 Jul 2024 10:15:05 +0000 Received: from VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::89dc:c731:362b:7c69]) by VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::89dc:c731:362b:7c69%6]) with mapi id 15.20.7784.016; Thu, 18 Jul 2024 10:15:05 +0000 Date: Thu, 18 Jul 2024 11:15:02 +0100 From: Tamar Christina To: gcc-patches@gcc.gnu.org Cc: nd@arm.com, jwakely@redhat.com Subject: [PATCH][contrib]: support json output from check_GNU_style_lib.py Message-ID: Content-Disposition: inline X-ClientProxiedBy: LO2P123CA0003.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:a6::15) To VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB5325:EE_|PAWPR08MB9662:EE_|AMS1EPF0000004D:EE_|PAVPR08MB9037:EE_ X-MS-Office365-Filtering-Correlation-Id: 2157a237-6f86-4d48-2cd1-08dca7128544 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|366016|1800799024|376014; X-Microsoft-Antispam-Message-Info-Original: OfOMYKbHt0sDQftTWaP6QWiNAc8DI081LYutz9jGn6IYxkJ7Ut34EUPAhz3ZFsXzwwT7FHXj5vqA3+nc3pJasbHrfG3Ey2RJTevkjdpr9EN9EHOO+gdWO2G2nNgkwqTVy5CQgB3c5ET8ptvEba7V6h1ngRneyBCdulO9rKDIbqnB4LwZBEWsE3XbxVX5aXB7XyfXjmTtCgsEzzNvhsmQC9AaKKitAcRI7+Mi7Zus1QsN/mVOzlZEN9VboRSVQAsU3cpigxGsNMzXW4qQTlaeLZOB78BWRtrDT7jjbUkjzp+Vri/H5cCMMJXxT8AowxLHgQPR+rf2Ente7emEoHovzYDPfYXeXdCSuciuYOiFkOhWesCNPv/d9907h2SSuwVcryDNbS9tNtq8N80sZ5f6YT59U4WAgStMOH9HT6Yu31iZqycFBcEz7yXQlo97Fuff3O4bzPHVDe2HATnBD2g0ouVj6HrisCCgQBZFGzn3EUhA7T/PBLZ6+p3XXP3qjMX9rOdoNNgI+8EzCKiujazOqd0oQ1TgAOgJZuhqF5nFTdgwkxKbVdOqzuU3PUH04rxQtv7yFEex0DAE/rimGoBt9C6EsHoFveC6kO3CsnJhKWNOgmuPPzH1Z0jq7oYYj4DGV+qo3XOsMdhKembPFzPYYdXK4VU4wg0B+Bj3EisX7ZtSiZX37sPd+C4jATvU48sZfBrfLFAyUhmTEAsV4lX0Ly73cXEz6l/0y4W3WsNnu8WfKSQzUXhoXn/rfxuAIFG3olL1w7DFXrHovEULWIxnCBx/sY4kr4mvusBIc9jERVNxk1EAp8yhFay2urO+JS/bES1DUDZ3kbjNh3h6QSVd41S+kicjZghdRRYDul/PEswPU53TTyJf9O9G/sBPcgPAFgk8vJt8O73EG/aiPxegg0OVsEZmufAtDU756yn1bwTeF22vlJ0lKX43knOICoWA27cWOdnCx3xJdYYwfLZc3u7k1jLSD+GecR+GpiUgI5BJDMjuls6o9B0/G1mffAry+dbYFoahtGxn/m7KSkyxgfyw2xQgvyfHwbO/ugaCDeGgjQb7yiIXluaMSgTPg6o8cPA04bXj1AehDLXBtNan8ohUq+JCjgRCvRVdZBry6dW70M4ZujNOK9OGntO+MQfdR0wDBkRRfNsx12jfAOxm5PHINmOP/RFDCe+NdERvY0uNUP0f2dIqkBu9solqY4+jzhpkGHPv/OdWwKfBWwF7yseJQWKM15oi2BALVNunvINErur3xctPnBjs+8xcbUKJboqV/g4pJlh1djh6SOTmpMBkPXV0g5Xlo8mr6t/MsU23XqMvx/ekm86AQwaGSqhv53JGpB1EzkMxAtpniJ0+2g== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR08MB5325.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR08MB9662 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:803:13e::17]; domain=VI1PR08MB5325.eurprd08.prod.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: AMS1EPF0000004D.eurprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 74cbc509-ce7a-480b-bbbf-08dca7127e6c X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|82310400026|35042699022|1800799024|34070700014|36860700013; X-Microsoft-Antispam-Message-Info: =?utf-8?q?67YGZfHhp3WO9dB2UU4gxBwlMC1yWJw?= =?utf-8?q?1WYbL3eR+sIehtLgsRmWUwtC8wUkN3NJtEBQGdFKj0nB9WZnSWHANp004aOvCvJ5v?= =?utf-8?q?hIAsG+nMss22x7GGZmaEnymjlHzDlfDgv15GpBwnEwcAaWQUvzcPqznQoH02nbucE?= =?utf-8?q?YHU0Ml/P5RtLdcCFICdU9l6wLaxzLlj+mGzhOVX/8r+nE0ubhXh5ZdoIsH5xTLHD/?= =?utf-8?q?ZlKKGBdFwABr9OBO05cHFPm9dwvLHrakwSVJxxYVSqFlZNo/UntGXbwRQYXCpbL67?= =?utf-8?q?u54/EyIyS6sZUAtF0NTAPeQazC4RBzAVeFUyB/ZweluWd7aD16Mhbrn/wAcoajwT4?= =?utf-8?q?EJ1aTRXc7vmgUv1ImfZ3uM5xdHgMwqmRehvIab3YZ4X26pBbpXqLVCbY+oO9kQsAd?= =?utf-8?q?6ixaQRRMWplKvD0s1p7g0Xw0lMlrXCp/G4Vfj8sakq0QfRwKLPFhKKrNC7WOiyVNN?= =?utf-8?q?OY9OwxVJxVt+Nlk6bFg9y+2/LPk+ufS/KrLYGDw+Ag0YO2r829mlhFm7BAWQZ4Ct1?= =?utf-8?q?SM6NOkgq+sYOXv6m4lvVksV11CuY2hiphHuCVCi6I/xuFekxc7wv0WPauBZXEWJty?= =?utf-8?q?ncmnodh1J5yAzxHjaKvB4uy8yqo7Umq2U1/dA+hCPqqqRuNDNJl2WlupYF86ez2fS?= =?utf-8?q?ilJexFe/VZODj/xavkCoBygR0ukayWxsnP9y0rXareSdamedQaN3xZVaYJDzazjJy?= =?utf-8?q?cWB8P4jPJZcVvBu5OlqQQTPqJ7CQXWOCq70r7U09K/oNCv/PW4me+MF54eSl93UIE?= =?utf-8?q?e3j1L3uJ9v6enl3PH8arUjU5UMw6FV3LmKdIpYeCPOv9SuFPzzXbN06/A64X2Aumk?= =?utf-8?q?UdWEMQyE4R0XpET2Jg2uioLkvHJg/QdHxoEDdPTxOO5f5qdxNTY/7rADYJKB2Y/0s?= =?utf-8?q?/hL6PKY2mfjA/F4uCN4AUhefk13p9tm8eoML4n3XlPIcy/1rMBJxNn4cqyCkBMoT7?= =?utf-8?q?+LY0DOJujuvQn7km+k5QkHOIVVYsIW3rBHB61V0PcqnsomJw21xPy0CA3Pgoke2cV?= =?utf-8?q?WG6WnIvjOv/HnoOq+J7zPDcuzz2bixBNN5HKFIKePynEZEw3MgPB4LvLhM9/1ppX6?= =?utf-8?q?aaMEpP9S4ldTytXPwgCtCgaZ/n5I71MtUnTTVomVs/rElAVzl2jvyoBOQNbGAys34?= =?utf-8?q?LjCwBMKRd2foK9hB7H10BLnLdcCOz7hcsX7+aGANASZZOttQSQJD+TMltkdOIrI0x?= =?utf-8?q?m3p1MNi7eTIpgrOTf5pOOHvdSLh+tR0qnElxjaWN4Mo5KJUV6CA4Ega/v7uO8B/m1?= =?utf-8?q?A4Lrf4gGLLa1gbGd76YGVmx7UJxmG9ak/dvn0AuPD5LgxG90BJAzWt/1rq4lnRXXa?= =?utf-8?q?d6w7yOSj1YdMAE7bKNGf5tyrOmZREjqLCj+6rVUn+CtifBt0ScAT/uJ/DENAzhaeY?= =?utf-8?q?TNI9jCYPzHz?= X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230040)(376014)(82310400026)(35042699022)(1800799024)(34070700014)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jul 2024 10:15:16.6074 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2157a237-6f86-4d48-2cd1-08dca7128544 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AMS1EPF0000004D.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAVPR08MB9037 X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, KAM_LOTSOFHASH, KAM_STOCKGEN, SPF_HELO_PASS, SPF_NONE, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org Hi All, It would be useful to automated tools if check_GNU_style[_lib] supported returning the result in a structured format like json. With this change calling: > cat patch | ./contrib/check_GNU_style.py --format json - | jq . produces: [ { "type": 1, "msg": "lines should not exceed 80 characters", "count": 22, "errors": [ { "file": "gcc/fortran/trans-array.cc", "row": "4893", "column": "80", "err": " && (ss_info->expr->value.function.isym->id == GFC_ISYM_MINLOC" }, { "file": "gcc/fortran/trans-array.cc", "row": "4931", "column": "80", "err": " tmp = fold_build2_loc (input_location, EQ_EXPR, logical_type_node," }, { Ok for master? Thanks, Tamar contrib/ChangeLog: * check_GNU_style.py: Add json format. * check_GNU_style_lib.py: Likewise. --- -- diff --git a/contrib/check_GNU_style.py b/contrib/check_GNU_style.py index 6b946a5bc3610b8ef70ba372ea800f892eeac85b..0890947f1f9b60c37ff62e23007c3a0735fd9c14 100755 --- a/contrib/check_GNU_style.py +++ b/contrib/check_GNU_style.py @@ -31,7 +31,7 @@ def main(): parser.add_argument('file', help = 'File with a patch') parser.add_argument('-f', '--format', default = 'stdio', help = 'Display format', - choices = ['stdio', 'quickfix']) + choices = ['stdio', 'quickfix', 'json']) args = parser.parse_args() filename = args.file format = args.format diff --git a/contrib/check_GNU_style_lib.py b/contrib/check_GNU_style_lib.py index 6dbe4b53559c63d2e0276d0ff88619cd2f7f8e06..f2d7527487007ab125c4b9c27ebf2b0d97df6fea 100755 --- a/contrib/check_GNU_style_lib.py +++ b/contrib/check_GNU_style_lib.py @@ -29,6 +29,7 @@ import sys import re import unittest +import json def import_pip3(*args): missing=[] @@ -317,6 +318,30 @@ def check_GNU_style_file(file, format): else: print('%d error(s) written to %s file.' % (len(errors), f)) exit(1) + elif format == 'json': + fn = lambda x: x.error_message + i = 1 + result = [] + for (k, errors) in groupby(sorted(errors, key = fn), fn): + errors = list(errors) + entry = {} + entry['type'] = i + entry['msg'] = k + entry['count'] = len(errors) + i += 1 + errlines = [] + for e in errors: + locs = e.error_location ().split(':') + errlines.append({ "file" : locs[0], "row" : locs[1], "column" : locs[2], "err" : e.console_error}) + entry['errors'] = errlines + result.append (entry) + + if len(errors) == 0: + exit(0) + else: + json_string = json.dumps(result) + print (json_string) + exit(1) else: assert False