[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Generalise the usage of exclude-list.json
- To: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
- Date: Wed, 25 Oct 2023 08:35:14 +0000
- Accept-language: en-GB, en-US
- 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])
- 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
- 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-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-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=NNbhZlExo5wD1lvcfG6uLkjVlq38BBavj303vRnkMZHacsXi2s9Qzg89WjyaReZXdhJYeIU6i69QHAQBVolq8f7IS07GFVQ0yNpCq2mTbz97GoDPut7V7AZGI+trvNdaCyPnjkEKQrKrx7goLzYlUeo2uzvPCfQFbUtHZvq3aj0+/ZZbm8MU3wiSonHK9Aw3c3CujSb8U7WVfyMK2FMmDz66U/ZQPoUkex5mCO6RyuHI2jRBdf7k8lTG5n+7KKl1jinU86tS5VnHXhO2lsKxD62btg6UFhp0t2bjAvKn2cIsjQBtUbsifgyiu0hhf6i9as3RMDf2RXTAvQbTPpxEKQ==
- 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==
- Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Michal Orzel <Michal.Orzel@xxxxxxx>
- Delivery-date: Wed, 25 Oct 2023 08:36:48 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Thread-index: AQHaBx4txv2/tLojDE2toOJeF6UsEQ==
- Thread-topic: Generalise the usage of exclude-list.json
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.
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.
--------------------------------------------------------------------------------------------------------------------------------------
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
|