[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Generalise the usage of exclude-list.json


  • To: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 25 Oct 2023 10:56:31 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • 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=+fUTbTbQGJxxRRhrt66KxqM//FooPHHKk7wSHiTN4h4=; b=DpS+oEQAIx46oQK6cNfci3jID1aEIbYC25dKzZ05VTuro575glQCDbdmlKmN49DXymWTNP5AN2iHDGxcDhs7tSNMx7n/V91IRADoFVbSRvjGHeiGIdHbbVIlc+b9s4EiYeZRv7b7+ypSGEm2qTgUw5MllDlJb0Jxh5QC+naZDiSy81OfbNdWXCDLW/hM5u2s3Ibq9H+QWTlm+/+cFvU8VlLVIxrfRkKEaFPi1RSLR2093lK8cgzvQm7+WtDfPKcteuyaG5+W8h+Zm3Y9zG5hcy6qrpJiVCf1ASFC5NhiK4wc2BGUvMY7xDN2c+174zAVYZ3GKggTFQJfJNBIRphTiw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Sk/wQMhFJeo4lrDX71u5FMO5ss0q0EGcj+A61AFBuzns6B2O19Cjtrrt8vvF1txkIoJI2rqdbxbY+bsRKf5PXYs+gn7diJp8oJH4aL5uXRS6reMYYKPGIhYSq8X+af1NC6ZvRAt7g1NaYvFw3FyYdY5A3Cm6ytoj6MPF6iZWQ3shAsikX7YkpUYelAdfDimWcQVsxjqm/38ifrEA5oSrnOVsVVvtxpIQohPj9tBQG2ICVkDAnDRNEX0q5osA0MqkpVMZOBrWz92oOqYrag/6HfT/nfCSp0fi4GWm8Jdu61LbQDC/013h7/tcdQECmEWCplgXofhQ8cSJB6+xtXowpA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Michal Orzel <Michal.Orzel@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 25 Oct 2023 08:56:49 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 25.10.2023 10:35, Luca Fancellu wrote:
> 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.

Looks okay to me, thanks. Just one comment on wording:

> --- 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.

I'd suggest s/allow/ease/ - backports are always possible, but may end up
needing to be done entirely manually when original formatting was altered.

Jan

> -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
> 
> 




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.