[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] docs/misra: Add instructions for cppcheck
- To: Julien Grall <julien@xxxxxxx>
- From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
- Date: Tue, 28 Jun 2022 15:23:49 +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=jkAEXHpWhd+TGBrVXj9Cje4WR6fV5sL+sqCK7ejyEIU=; b=KRWSOyVNM8PED4jpiyDzaWMhQ8g4TlMQoOXni7cMRioUsRjenr/4TKgDuOSStOs4ul2AJsczUDhMVTJNWl7iI+6RH+lpSRsyZmu1EmYlYYO8nrpO9D1A3tJoZ68YpD+ouLFFZp45frg3dphjU/w8iG0/qHEp+Jk5CKrDlzDaYpXC1BHXCHzNysxv0kMxZRqeh1PJeIiUDj5D7xifoUV5LSZocBWePTKgADyeKb25KoRrZ6vizUSDZUvrGo1MorCFPQr5hvIcudj15Ajng2xeCH4mSWu2om90hvsrHEfPI5/WTzYh4GFNPD1peFqSSn6GgoXVT1smcts5884xG8Ajqw==
- 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=jkAEXHpWhd+TGBrVXj9Cje4WR6fV5sL+sqCK7ejyEIU=; b=YdFz1Er9iHQNq1NnPD1LZRPKAbnyjIpubslsTWVjvRWKt/NI8FKR6RZnf7QiW/J9nN+ZA1Wagr1roSquaGoYWyqi8ZZY97ODKP6qk2H6WmKYMn9E0+wPDNwVB7qCuiGge9B4eocuuAIhncZ4h7PuoSEKS+tAERr8JvGQY/tplLFSAWEdelVdPKqYVY7qb9aRRK2PuWFxTDE3+H9KXV3323mKbsKD6RrNHBl9+hliQ4vOVjAWBm7v9SW3maL0PhCHeUTBpuPxsnhcpM1JxwwWI52CzAzybYP5nVweaEtuZ2PwW51yEn0+51KeQHX+0Be5mZVzPhnkBbrU4g3A7cIaXQ==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=PKL0BA4lwDA//0i8Bl91+MQjt/XrDLbkE9QIZxC25WZfEtmPsa8Sf6Kv18pFiwuvBaG5IWYAYGyGW0r39DOLbZ65uKgUtAFAjTNbu4hhufWZqhoueidSustyDAA+HSgUJM3w2JiK7gr41DcajjWdu1GdGSrItirIjH8OEglsHWRCvYOhFa2gHoo/w2ek99FBJ0lnVNeAHIt5havwUg5die1l9vCtE5XnL/AXcENQ+xrrmZPUeqLnaPXvzgZl3sgMV0wi4kAA6y8mrEdsI8ym81vbb28I03pld2qyzdgJfMIkaVDfg5sd2SXiEVB680uobzXYtaeDGtZzurzdBp4vMA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XEP54BOOA75lEMz8S2VZ1JRyCIgEPYyNGKkUL8N5AwYLnjRhO0F4rgrptk6n0O5tWxLSps7IkgjfrQzw8u8FMBWMlZCNrG43AIXRnJtPcXIGvcCSt2D0aLG8D7EXd63pqJk7gpGU65y196oOy4W94rMMC2qZRWJrg7awxRVY6XWAqOpDf2Z0QvDoR5oxnM/U6ojwVp3kVPzRJmm8Phh931oy8xCpvzRse8v+cq+gFE2EexxuArOtXCPDrhhg644LqZD95mIsn0PfjqPQJQk+HdwjHeiBUkUQFQP3sgw46hk9SC0OYQp6HW5Dyy5ZVLqAE3mzgND+sjmlp0QuFbIj6A==
- Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
- Delivery-date: Tue, 28 Jun 2022 15:24:16 +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: AQHYh7nJHM8+T3fZ/0Gr0RGCgDxGeq1eaYGAgAALcICAAARSgIAAFXiAgABAfoCABidzAA==
- Thread-topic: [PATCH] docs/misra: Add instructions for cppcheck
> On 24 Jun 2022, at 18:25, Julien Grall <julien@xxxxxxx> wrote:
>
> Hi Luca,
>
> On 24/06/2022 14:34, Luca Fancellu wrote:
>>> On 24 Jun 2022, at 13:17, Julien Grall <julien@xxxxxxx> wrote:
>> I would keep the section about compiling cppcheck since many recent distro
>> doesn’t provide cppcheck >=2.7 yet (and 2.8 is broken),
>> If you agree with it.
>
> It depends on the content of the section. If the content duplicates the
> cppcheck README then no. If this is just to point to the cppcheck README,
> then I am OK with that.
>
Hi Julien,
Sorry for the late reply, this would be my changes, would you agree on them?
Cppcheck for Xen static and MISRA analysis
==========================================
Xen can be analysed for both static analysis problems and MISRA violation using
cppcheck, the open source tool allows the creation of a report with all the
findings. Xen has introduced the support in the Makefile so it's very easy to
use and in this document we can see how.
The minimum version required for cppcheck is 2.7. Note that at the time of
writing (June 2022), the version 2.8 is known to be broken [1].
Install cppcheck on the system
==============================
Cppcheck can be retrieved from the github repository or by downloading the
tarball, the version tested so far is the 2.7:
- https://github.com/danmar/cppcheck/tree/2.7
- https://github.com/danmar/cppcheck/archive/2.7.tar.gz
To compile and install it, the complete command line can be found in readme.md,
section "GNU make", please add the "install" target to that line and use every
argument as it is in the documentation of the tool, so that every Xen developer
following this page can reproduce the same findings.
This will compile and install cppcheck in /usr/bin and all the cppcheck config
files and addons will be installed in /usr/share/cppcheck folder, please modify
that path in FILESDIR and CFGDIR if it's not convinient for your system.
If you don't want to overwrite a possible cppcheck binary installed in your
system, you can omit the "install" target, FILESDIR, CFGDIR and cppcheck will be
just compiled and the binaries will be available in the same folder.
If you choose to do that, later in this page it's explained how to use a local
installation of cppcheck for the Xen analysis.
Dependencies are listed in the readme.md of the project repository.
[ leaving Use cppcheck to analyse Xen as it is ]
[…]
[1]
https://sourceforge.net/p/cppcheck/discussion/general/thread/bfc3ab6c41/?limit=25
Cheers,
Luca
|