[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: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
- Date: Fri, 24 Jun 2022 12:26:32 +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=ilwf5G7GhpmBjzHhPzhO4tgbwBWqXxS+Ytyby8oCuAc=; b=oZV9tLbpJUIe72hMetMWGEd7GAavbff7gJcjz4spZre8cwqQvmSRWlM9wKWgNKH7S9PxSjod5vecYetFIgNpDw2Be2PVyuomEEAT6SvO/YHcfYk8hmu3uDiTMxSB8TAx4d8kFw6qf48obsYedAcgcqZHZogKvgecVlf2df9vN0Sh1C3Al1+qPZwdpwCEywDgIn0An9J6na8qWqDYZ8822kltXAyro1FDoiZTL8JAKNXJ/J+w/jGM8MC/20ncAbql1OYkBj6bQYqG7AFeZqQWFnmuw7GVNYaMLcHoETaKOF5Ev8dvBnPe5plHGPdpROeMSxFd5dIVDp07L5/bvYU9Xw==
- 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=ilwf5G7GhpmBjzHhPzhO4tgbwBWqXxS+Ytyby8oCuAc=; b=Q9RfARdNv3o4k4y2bkFJ8TSs5dDW+icdMumBtitm0AeDJg6nGoYORExHdHVYT/AfZ3gic1XRJjQ5F17Os9SRStV2Mmmk2ZqwyVYiXEg53VclrTZnPMJmgPnozdmXG7SlRo+94bRCOWGMjHG8qcSymbU/DK9iGXlxwCSbYk5IGjSgKsUcCqJg6Tcnffyffg9bvGrlUa5kurOJGpaKBtue2pEHb5AKL7+XVd7p+8wUBsdXBJaYJOH5jKny8td/I8JV+9vDx8/xemRCvkAKBpjVyhf4IbuKQ32dYLhPjS2g2Mf/6iNcSsdptn+cL+DvojeaH7WsRnAPOt+PFQCYoL6S6w==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=PDb25U0fa03Hq3F4ZawuSD8VKc1R7jXYnFZqVkXV7/KIMJc3MoUW56yz6hmZhpcMKAvuahijocDx6WobQcE8NmFmwJaYtZAjw4CDNG2z5ldOMMJzu92HL0QpRod3mksJhbefH74gS5xBpZ5TIgpOrVsGoGaurpDnJNmy4+Mrp5RjqVzNJgJ3pbGHRsddokfFB30uuDFNytr/PLzYrT9U5gGgEB8VYbQlbFY1Q1rN66hv7GqbnSQeKGkqgmXcWM+2Bke1q4XF1MoBTDJxWqJsQ2sTe4RW3afsQZ4gg+lE0wVRuj7EkB10DaRLW1SzVyAPvVEUmeiEZfJ2QYfH1Am6Aw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y+YTV8ogqSSujEsetpROOt6xh14YxiapER93o28XcFQQyHIYql8l32wGQY7pmTE3eh5h3zjeTWhewT5+EU1UIcCDTM/hxK6IWIXeCxhZauoYTBU4Rj2OdbjawvCSrZw3/HVRgTa8kqn+ii9j8NVkld6c+M99ye5YRK1CNWydQB4kNpZmWqP5mP+scMnR61y+PBJyF99LoMxgSuIOq3VuIlubKlvcKeQTI12i4WQSzivKDRnieJebjEy+Znd+J2QIFDmIOJMpRvn6r51+n0L+c5X5yDmSh9xLtBarCl7kNdT0xIRFHAAVyG2rfyc5irMBYmBupnPOFKJM/+hLY3YD/w==
- Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Cc: Luca Fancellu <Luca.Fancellu@xxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, 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: Fri, 24 Jun 2022 12:26:54 +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: AQHYh7iovubAjsqNDkKOdqYTdWMQia1eaYSAgAAFkYCAAAeUAIAAAtiAgAABHQCAAAE2AA==
- Thread-topic: [PATCH] docs/misra: Add instructions for cppcheck
Hi,
> On 24 Jun 2022, at 13:22, Julien Grall <julien@xxxxxxx> wrote:
>
> On 24/06/2022 13:18, Bertrand Marquis wrote:
>> Hi Julien,
>
> Hi Bertrand,
>
>>> On 24 Jun 2022, at 13:08, Julien Grall <julien@xxxxxxx> wrote:
>>>
>>>
>>>
>>> On 24/06/2022 12:40, Bertrand Marquis wrote:
>>>> Hi Julien,
>>>
>>> Hi Bertrand,
>>>
>>>>> On 24 Jun 2022, at 12:20, Julien Grall <julien@xxxxxxx> wrote:
>>>>>
>>>>> Hi Luca,
>>>>>
>>>>> On 24/06/2022 11:53, Luca Fancellu wrote:
>>>>>> Add instructions on how to build cppcheck, the version currently used
>>>>>> and an example to use the cppcheck integration to run the analysis on
>>>>>> the Xen codebase
>>>>>> Signed-off-by: Luca Fancellu <luca.fancellu@xxxxxxx>
>>>>>> ---
>>>>>> docs/misra/cppcheck.txt | 66 +++++++++++++++++++++++++++++++++++++++++
>>>>>> 1 file changed, 66 insertions(+)
>>>>>> create mode 100644 docs/misra/cppcheck.txt
>>>>>> diff --git a/docs/misra/cppcheck.txt b/docs/misra/cppcheck.txt
>>>>>> new file mode 100644
>>>>>> index 000000000000..4df0488794aa
>>>>>> --- /dev/null
>>>>>> +++ b/docs/misra/cppcheck.txt
>>>>>> @@ -0,0 +1,66 @@
>>>>>> +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.
>>>>>> +
>>>>>> +First recommendation is to use exactly the same version in this page
>>>>>> and provide
>>>>>> +the same option to the build system, so that every Xen developer can
>>>>>> reproduce
>>>>>> +the same findings.
>>>>>
>>>>> I am not sure I agree. I think it is good that each developper use their
>>>>> own version (so long it is supported), so they may be able to find issues
>>>>> that may not appear with 2.7.
>>>> Right now the reality is not that great:
>>>> - 2.8 version of cppcheck has bugs and Misra checking is not working
>>>
>>> Can you be more specifics for "bugs". Is it Xen specific?
>> No it is not Xen specific (see [1] for more info)
>
> Thanks for the information. How about writing something like:
>
> "
> 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].
> "
>
> [1]
> https://sourceforge.net/p/cppcheck/discussion/general/thread/bfc3ab6c41/?limit=25
>
This up to Luca (as it is his patch) but I am ok with that.
Cheers
Bertrand
|