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

Re: [PATCH v2] xen: Add MISRA support to cppcheck make rule


  • To: Bertrand Marquis <bertrand.marquis@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 9 Jun 2022 12:12:16 +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=DNJhQRJwcy1cRgL+GcMx71Kx/vI63KNV/AsP3CWfQxA=; b=JZkrK3rH4E6ks4COaWoLj2UBvmcxpW8S95oGaUaCvM4/vtrQW/nRFGbfWp4vSvCKosy7zG12I3y5HaOitPnFCZv4IZenbtueemvhnTMUlyONuFmixnMnlpxZvM1QJY1foF0mjFb1D5X0d3c6elLYR1M+Ru0qaTRCI7P61+Cmmt20xwIZSDDxIVoeSbCo+PS6LBq9Y0ZuBE0st1m3dHZqumb0LniYVQu49RiYNsXJSgu1femmvdyzfrAYma8jHy5aGrnPyT+tf1WTK5xUl/8KxhQBTGO+wurBJOAAZ/7Hp43R4E8vZbaYROpIdhxopn7C7aSXrGJLpo7NrIbSt7M++A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MnS9Ko8haU9sC23yvdvtuv01zYmRAHnF0MCy6gCNkO1CFGKn8SaSpSrZqYGyUGuGoLVc2+u9pOawj+k0i3vx+GohZBQnP4GijTZc8NXxjmh34PrLhERUFIlFIAwSlun3ARjW7REIK6jq9vpI450bBeJ7nTR5cv8lO0A7+S7jNtolH9TKaraUTcp20TViC/txk/bdOI0Y1s5zKo9ZpAA7K8129G0Snr4iUeDlQ4oSdWUpE/0qi47S53S8EHsAqeaUdAOuA4YdoTfEtsGuoORwdA5YW+9zPWJP55YxFseC30CLgh1xoe9lDD0ltn2hmZ4qUVtkKDKtJGSMNHizxqnPpw==
  • 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>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 09 Jun 2022 10:12:24 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 09.06.2022 11:34, Bertrand Marquis wrote:
> cppcheck MISRA addon can be used to check for non compliance to some of
> the MISRA standard rules.
> 
> Add a CPPCHECK_MISRA variable that can be set to "y" using make command
> line to generate a cppcheck report including cppcheck misra checks.
> 
> When MISRA checking is enabled, a file with a text description suitable
> for cppcheck misra addon is generated out of Xen documentation file
> which lists the rules followed by Xen (docs/misra/rules.rst).
> 
> By default MISRA checking is turned off.
> 
> While adding cppcheck-misra files to gitignore, also fix the missing /
> for htmlreport gitignore
> 
> Signed-off-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>
> ---
> Changes in v2:
> - fix missing / for htmlreport
> - use wildcard for cppcheck-misra remove and gitignore
> - fix comment in makefile
> - fix dependencies for generation of json and txt file
> ---
>  .gitignore                     |   3 +-
>  xen/Makefile                   |  29 ++++++-
>  xen/tools/convert_misra_doc.py | 139 +++++++++++++++++++++++++++++++++
>  3 files changed, 168 insertions(+), 3 deletions(-)
>  create mode 100755 xen/tools/convert_misra_doc.py
> 
> diff --git a/.gitignore b/.gitignore
> index 18ef56a780..b106caa7a9 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -297,6 +297,7 @@ xen/.banner
>  xen/.config
>  xen/.config.old
>  xen/.xen.elf32
> +xen/cppcheck-misra.*

As said on v1, this wants to be added further down, while ...

>  xen/xen-cppcheck.xml

... this line wants moving down at this occasion or in a separate
change.

>  xen/System.map
>  xen/arch/x86/boot/mkelf32
> @@ -318,7 +319,7 @@ xen/arch/*/efi/runtime.c
>  xen/arch/*/include/asm/asm-offsets.h
>  xen/common/config_data.S
>  xen/common/config.gz
> -xen/cppcheck-htmlreport
> +xen/cppcheck-htmlreport/
>  xen/include/headers*.chk
>  xen/include/compat/*
>  xen/include/config/

xen/cppcheck-misra.* wants to go alongside the line you adjust, while
xen/xen-cppcheck.xml belongs yet further down.

Jan



 


Rackspace

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