From patchwork Wed Oct 25 08:35:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Luca Fancellu X-Patchwork-Id: 13435709 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2FBEFC0032E for ; Wed, 25 Oct 2023 08:37:04 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.622713.969790 (Exim 4.92) (envelope-from ) id 1qvZNc-0006r2-QJ; Wed, 25 Oct 2023 08:36:44 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 622713.969790; Wed, 25 Oct 2023 08:36:44 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qvZNc-0006qv-NA; Wed, 25 Oct 2023 08:36:44 +0000 Received: by outflank-mailman (input) for mailman id 622713; Wed, 25 Oct 2023 08:36:43 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qvZNb-0006pY-1N for xen-devel@lists.xenproject.org; Wed, 25 Oct 2023 08:36:43 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on0620.outbound.protection.outlook.com [2a01:111:f400:fe0e::620]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 9e78211d-7311-11ee-9b0e-b553b5be7939; Wed, 25 Oct 2023 10:36:40 +0200 (CEST) Received: from DU6P191CA0007.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:540::22) by AM9PR08MB6723.eurprd08.prod.outlook.com (2603:10a6:20b:2ff::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.19; Wed, 25 Oct 2023 08:36:31 +0000 Received: from DU6PEPF00009524.eurprd02.prod.outlook.com (2603:10a6:10:540:cafe::bb) by DU6P191CA0007.outlook.office365.com (2603:10a6:10:540::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.19 via Frontend Transport; Wed, 25 Oct 2023 08:36:31 +0000 Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DU6PEPF00009524.mail.protection.outlook.com (10.167.8.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.15 via Frontend Transport; Wed, 25 Oct 2023 08:36:31 +0000 Received: ("Tessian outbound d1b3e404ba03:v215"); Wed, 25 Oct 2023 08:36:31 +0000 Received: from c85d38555060.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 1DDFDDEF-F418-4A89-8A31-CA9332B41908.1; Wed, 25 Oct 2023 08:35:18 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id c85d38555060.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 25 Oct 2023 08:35:18 +0000 Received: from AM6PR08MB3749.eurprd08.prod.outlook.com (2603:10a6:20b:8f::22) by GVXPR08MB10541.eurprd08.prod.outlook.com (2603:10a6:150:158::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.19; Wed, 25 Oct 2023 08:35:16 +0000 Received: from AM6PR08MB3749.eurprd08.prod.outlook.com ([fe80::76e6:a7e1:1592:866]) by AM6PR08MB3749.eurprd08.prod.outlook.com ([fe80::76e6:a7e1:1592:866%3]) with mapi id 15.20.6907.032; Wed, 25 Oct 2023 08:35:15 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 9e78211d-7311-11ee-9b0e-b553b5be7939 ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=NNbhZlExo5wD1lvcfG6uLkjVlq38BBavj303vRnkMZHacsXi2s9Qzg89WjyaReZXdhJYeIU6i69QHAQBVolq8f7IS07GFVQ0yNpCq2mTbz97GoDPut7V7AZGI+trvNdaCyPnjkEKQrKrx7goLzYlUeo2uzvPCfQFbUtHZvq3aj0+/ZZbm8MU3wiSonHK9Aw3c3CujSb8U7WVfyMK2FMmDz66U/ZQPoUkex5mCO6RyuHI2jRBdf7k8lTG5n+7KKl1jinU86tS5VnHXhO2lsKxD62btg6UFhp0t2bjAvKn2cIsjQBtUbsifgyiu0hhf6i9as3RMDf2RXTAvQbTPpxEKQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=YW9fcY7oxHq4+hUiAEDDADW2sTtuzwxcCxWoAE6BAqw=; b=SEQmV31cXGZBqcij9okTv5u5eCziXlGOcZxijsr7XXL8MyyzMMFi8YeROzWw2jPKHNIuUMBWWae9xmPQq6R+rUC7Tbrrl61lGOqV0uhEq1gzUwJOdMkNO3HEpR783fTK687013KjsbZt5OAnP2cSn5LhNNUXaHU13A2QS6NpcsQSR4e7t6bBNP5Y7ToTG1V46WJpLi+f3FqbCZyDGJK57WPySnIjOAsNXu7SC1j9HAd5yj4IGdDRmapC11UaKYFs0ExoAsYBa/dc+MulSCIfXIgUXvd+Bad3C9q0Xi7OYzZFYIDz0bx3KNf+G5j9ONyRat456ETCSjWDRWHb2pVaXA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.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=armh.onmicrosoft.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=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YW9fcY7oxHq4+hUiAEDDADW2sTtuzwxcCxWoAE6BAqw=; b=slNaKdIPSHhTuBefFAqR7Xwr/9h7G2RVR2rRXP5f0dBn7tZFXHeDvbowq4YKQ+43r4XqhUMTpkjDNww4IO9he25abih/OYEFdLwqLJaP4HcyTCueFNIvWMycP6rwJeAmqQd07fJ82ZqBvNxi7qrjm/mH5xBnPkyMM0GIP7pTQD8= 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=armh.onmicrosoft.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 X-CheckRecipientChecked: true X-CR-MTA-CID: a3fe5f83cf032484 X-CR-MTA-TID: 64aa7808 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TDy4Evu9TiDNyIVBwTjNlFSyN9d4IdEAqwYIReDztjHIwgNi73dkeewcnKbOV7e2oKr/ESKQdZ959e3U4qcvqjpqGuI70MSll9Hi8rLAGLFpWnN7bNZ3Ha6B9MnW8m4xrdu57z1m7gOc9jpTPVDSLOlW0huZAJaIA/2HBBnZSiJvxMP+g3q+8ruHM2xNZEQGbWXL+Eg6xGm7N6t24d/rONbhUl59yRYOxPc3aDwDaTyOg/eS0r/sfE4EMUbvo0/klg6cQwjDfjMV96B6eaJ6kX9Ofrfa/VP0sWYAcmbs6b3tFuTXIqf0SDxO8yAX9UyOTyo7yU48oC8vQkF8VvxShw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=YW9fcY7oxHq4+hUiAEDDADW2sTtuzwxcCxWoAE6BAqw=; b=kAYS/OQlp8tV7M1puhNXRnvgrduTaOW2l8qbdEgenM4H3ZAHfPo6CdYOXnufzcvFSm16mj8R5RjIFD8HddJLl5+XrdaFBw68cbzLOD8GO9P9jK85ynNkLVSsyn52hCLSNxWPWphrejqEsW3wDOPF07rKjfZK8dPwU5TsClmeUr9Sbo6HNsACHeXTK/t3SsVdTmIQvbl19XSb/4nvYLJALnAuHMpnfZwr7ske1Emjy6nOaQEQw41s3tLu7trOfpuhXeTca1R8N+HQ3rD5OukUH4xgcf/q6tcY2twuMmKFKuQspUi50RTNG8Osqr7nkp9aIpJIjd1BcLzK01QD/zDf8g== 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=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YW9fcY7oxHq4+hUiAEDDADW2sTtuzwxcCxWoAE6BAqw=; b=slNaKdIPSHhTuBefFAqR7Xwr/9h7G2RVR2rRXP5f0dBn7tZFXHeDvbowq4YKQ+43r4XqhUMTpkjDNww4IO9he25abih/OYEFdLwqLJaP4HcyTCueFNIvWMycP6rwJeAmqQd07fJ82ZqBvNxi7qrjm/mH5xBnPkyMM0GIP7pTQD8= From: Luca Fancellu To: Xen-devel CC: Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu , Bertrand Marquis , Michal Orzel Subject: Generalise the usage of exclude-list.json Thread-Topic: Generalise the usage of exclude-list.json Thread-Index: AQHaBx4txv2/tLojDE2toOJeF6UsEQ== Date: Wed, 25 Oct 2023 08:35:14 +0000 Message-ID: <5883E219-2C0C-4809-852B-704C6ED0E736@arm.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: Apple Mail (2.3774.100.2.1.4) Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; x-ms-traffictypediagnostic: AM6PR08MB3749:EE_|GVXPR08MB10541:EE_|DU6PEPF00009524:EE_|AM9PR08MB6723:EE_ X-MS-Office365-Filtering-Correlation-Id: e44770b5-802c-4df1-e738-08dbd5357d2e x-checkrecipientrouted: true nodisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: Tuu36BjwldymqR2zIlavYfFNsBXMGuy79d7cRqbtu3zabrYdfkuI6Z+UKfht5CC18ZKcRRVCYZr+lHqIRvpSNrOiNdVPTLuR+SKXZpfVb8yT0xpAkaXJG0LrVW8j0gyxcJkvBx/k+QriZSmJegunuwvJvk0BGhbdmAmzd0D4PPcYGfoofjF9tWHJZ78Yk8TCS1G2e1h0d5mZ6FdEs3SMzZUu3Ho0flQ57LsIREK85B0T4dJ77yrG5fdtGE1qEbJVn8Q0HGrA1Rv6Chvd5AlUAb4jKuHL0CeC6v1LhjyoGY02cd6y/abWsmhOASOHOFeEdQdsW5u/7bO+F46DdmzZQ9YH6VPahgZNpPdnOS17Xdlqmtf0z3l4EgrSJWQkhUcM3CG0kgjLbaDcKJjSVduQUne+FbwUM9w3RyxRpMeDVViHeIaGzgWi1gQHfDXqjwXuK89CazSe39pRXcXczAiV2Eds5YMrczvSCWf2QxzkgdRrg4dORZ5Qv5mCHVUFHZHak9QK5ST83ttBMl4ir3yjVz/LN7ezfru1sFCQjMk3XnGFTyXVtvqBFzjrGac/iHrk0ua7uGLSVQ34ULvuE5nHErWufZ8yGpTr6DM4ME1q7rdx/47WWozkLXEJCQbk7azZ1dfB/UVGT1aOTaz/K9gULg== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR08MB3749.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(136003)(376002)(346002)(366004)(39860400002)(230922051799003)(186009)(1800799009)(451199024)(64100799003)(64756008)(66946007)(66556008)(66476007)(66446008)(6916009)(316002)(54906003)(38100700002)(478600001)(6486002)(122000001)(91956017)(41300700001)(86362001)(76116006)(8676002)(8936002)(71200400001)(4326008)(6512007)(6506007)(33656002)(36756003)(5660300002)(38070700009)(2616005)(2906002)(83380400001)(26005)(45980500001);DIR:OUT;SFP:1101; Content-ID: <056CA85A3DFD9746A3CC4A5AF446665F@eurprd08.prod.outlook.com> MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR08MB10541 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-Transport-CrossTenantHeadersStripped: DU6PEPF00009524.eurprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 55beebb8-6d63-4258-82c8-08dbd5354fb2 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SLszQpc80O4cgUKsf7kX/kLKeKgLxX7Iu+uX2geurNV1S5E01c/6N5YACD91bYhHyir+UFlv8nJ6/4F9CMkbHxVxM1hs7AT2iuC1qfgBa+X7chM/MlGabQux+kxu+bviZABbqnbrDoY6LWpE2MABChuvNL13uszEr1/Va22aCcYqj9M4KjdAnUWpjyTnBBvRG1MzH+zgBnzBxlfuoy88Tj9LHdJj+2AMr+7iYlX4Q2oLY2lK9ePHpZ7jwMwQkGCkTinahgyjnhperV8n9kI05m/ylFTkAdzGG8fmTFve+cePIql3zNJyu9yMmk27eeBUZzjYwbnWD/eh9CndnF3qi39B8SP2WGUrPzegqPqsfxGn/AMJiisyeZfi2MGihfpinN9oGsFgu/xTas9VvF9rs9DtsnJc7vxQETTmrC9aoHCCE2fDTtJ7gaTXcl0N2iBjaQcMrmFzVC/qF7Yro/pGBZVrOUaRFQeRIe+jl5QwRVYNBG/2yA0LGb93V3NGPSnlWy1ImyJLOLyuhO1HUfDdKxlfjxkJNP3beAA2wXW5xpp65xJiu4eSfE5MCr0H//cWklTicYH5p/1Kyd3SPBdT5AaYiAXl2mPvLjI69Ec3Ixx4NzKvKBiGP5/Qf7nsOWjhWuh1rNfDmcUymBvLjbNAqlvV8lfsH8wDH1ZCf5sqfJILZdkri7HzTYsLp4XCALqXO17bj0T5CfPmQ+E4aB3YzO1e6cp+yzSPEQIV2AacgZpq6LbMATbs1aERF8mUbUCp 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:(13230031)(4636009)(396003)(376002)(136003)(39860400002)(346002)(230922051799003)(451199024)(64100799003)(186009)(82310400011)(1800799009)(36840700001)(40470700004)(46966006)(2616005)(336012)(36756003)(26005)(81166007)(40480700001)(40460700003)(6512007)(33656002)(6506007)(47076005)(83380400001)(82740400003)(356005)(8936002)(6486002)(8676002)(4326008)(478600001)(86362001)(2906002)(316002)(6916009)(5660300002)(41300700001)(36860700001)(70586007)(70206006)(54906003);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Oct 2023 08:36:31.3109 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e44770b5-802c-4df1-e738-08dbd5357d2e 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: DU6PEPF00009524.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR08MB6723 Hi all, I’m sending this mail looking for feedbacks about generalising the exclude-list.json, as suggested (IIRC) by Jan this list can be used by multiple users and not only for MISRA, by adding a field to every entry. These are the modifications I would like to do to the list, I will implement them if we reach an agreement. -------------------------------------------------------------------------------------------------------------------------------------- In this way I could use this list also for the clang-format tool, excluding all the file from external sources plus the file we don’t want clang-format to touch. Cheers, Luca diff --git a/docs/misra/exclude-list.rst b/docs/misra/exclude-list.rst index c97431a86120..e624bcfef056 100644 --- a/docs/misra/exclude-list.rst +++ b/docs/misra/exclude-list.rst @@ -1,17 +1,16 @@ .. SPDX-License-Identifier: CC-BY-4.0 -Exclude file list for xen-analysis script -========================================= +Exclude file list for xen scripts +================================= -The code analysis is performed on the Xen codebase for both MISRA -checkers and static analysis checkers, there are some files however that -needs to be removed from the findings report for various reasons (e.g. -they are imported from external sources, they generate too many false -positive results, etc.). +Different Xen scripts can perform operations on the codebase to check its +compliance for a set of rules, however Xen contains some files that are taken +from other projects (e.g. linux) and they can't be updated to allow backporting +fixes from their source, for this reason the file docs/misra/exclude-list.json +is kept as a source of all these files that are external to the Xen project. -For this reason the file docs/misra/exclude-list.json is used to exclude every -entry listed in that file from the final report. -Currently only the cppcheck analysis will use this file. +Every entry of the file can be linked to different checkers, so that this list +can be used by multiple scripts selecting only the required entries. Here is an example of the exclude-list.json file:: @@ -21,10 +20,12 @@ Here is an example of the exclude-list.json file:: | { | "rel_path": "relative/path/from/xen/file", | "comment": "This file is originated from ..." +| "checkers": "xen-analysis" | }, | { | "rel_path": "relative/path/from/xen/folder/*", | "comment": "This folder is a library" +| "checkers": "xen-analysis some-checker" | }, | { | "rel_path": "relative/path/from/xen/mem*.c", @@ -39,6 +40,12 @@ Here is an explanation of the fields inside an object of the "content" array: match more than one file/folder at the time. This field is mandatory. - comment: an optional comment to explain why the file is removed from the analysis. + - checkers: an optional list of checkers that will exclude this entries from + their results. This field is optional and when not specified, it means every + checker will use that entry. + Current implemented values for this field are: + - xen-analysis: the xen-analysis.py script exclude this entry for both MISRA + and static analysis scan. (Implemented only for Cppcheck tool) To ease the review and the modifications of the entries, they shall be listed in alphabetical order referring to the rel_path field.