[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 11:40:55 +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=A0EQT1+W7rPpR3E1TsLQbl3LADF7j3n1GrM6w034SEM=; b=SlLIHtb1bQOZuveFAvjFX7FafzXUnG3Ur4q6bH5K2GyOMwo6wPKaInlm498M0eDBwz9Fa2YjpwDlDQ9kPbmmjcibrJCo2AdihydfAPy0+kYtxcHIcL6Swt1d4MWmalvKUbiv23ODw3LzD+BKm4OBGVtiLNfpvBU58pqHyL8TUnNyiEHsNYQ9mKAd/wuImg3mNXrlZO3LzQxFMM48lqx5K4d3s3eQqNUelloMYtOV9b1eyc5BEL5xqs7l5nQE8e/B/z1iQLLBOtUffxVmLjHI1bHFPV5b/bce0FCPX6p6fs+I4iuS7soRpaYaDhK3snQvEtCt3D3V/eBorAsky1aMRw==
- 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=A0EQT1+W7rPpR3E1TsLQbl3LADF7j3n1GrM6w034SEM=; b=nZBz1fc0NC/WSP022i/Qn3Y0bJVzV7QBFchW2nt6ZqCHm5VyWevj8/VJnabrUFJwo1bpZYhWLl2Pmz44DfpI4qEqDUCZu2/8uCtYpaZYYYTCQwEi0qx0GJOvcOoVsAO/3AJVUe+zPwZuczUAKZufA0jexrr19JpeUPs6e++rVyACl4z3fYXVo/LILoDTyoRLJZT1sGGTG9yc/tyeVJ7e+S7ohj6WvCIjTh30OqLGzUE+X9gcl8nWkJf+eU6Nr4OZdtkBIpOpjwFYeMPrhA/g4Z504+Z4stB0L/03O6hugS5H364l3dlUjXQ3GxkkP4NWLy81myzDhYhmrsG0DZK4vA==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=Mp4kVlEVW8U+2HPzPCMlM4bjrvlp+QXmjmd3gPsKJlsIoyMTuZnkCzRLxejDHDRfNEdu5lyyu+1sNzYovo5dLw6P4DRynu+GtgnYMPXX+8xgFsW0sp7W0RhuAHAD/0ZzASOx/OuNURRUnFP/T9L191uORu0R2nDPnA+b7uyqtMmxHUx1cj/lYthp3OM+5wRISFiFDG1YBhHeJKOAZon+N2eQVlmX5zcPCfuiBuPJpGGTbd4IhJ7iihdOCW011xmAN5tDJrJwutqvnC9+waq3XjGpYmNuYL3467zuPrEv64TbbTBJ0/iCIT1U5Wg4tA4OY6fm4RvM6YLC3eGtubofMw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aFNC9LfqNZyzCuLoHHK4iSJiJnMHVBa4Bc9cW5d+u8jCBCXqtIxQ9vDAn8o2vC0TeycpcsN8JpwUzsKMuviHDok4T2ClBV0xqDIVqrZ3ccHEepfPMa5WkzEXVgw2++ZaB48gtYTxEAZKbL4xRmmvYhT3yKnL1VFqWf4+0hkSoqSUe/zke4cLhs53FIM68QrxBp8mgzZKLiBNjpa+LpOEtIyvAdo+M2lO2jVBPcMWLSyr7W3IoEIZ47t2eSYxnInMknVEvpLvvDzGOaHQ2rguzb8cy9fznNITHeGRkUiYq0Ef3x1NVNDlCzWibPl041AM11N9YZpUZ6+pCM8GJbbTgA==
- 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 11:41:23 +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: AQHYh7iovubAjsqNDkKOdqYTdWMQia1eaYSAgAAFkYA=
- Thread-topic: [PATCH] docs/misra: Add instructions for cppcheck
Hi Julien,
> 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
- older versions of cppcheck are generating wrong html or xml files
So in practice anybody can try an other version but at the moment only 2.7 is
useable.
Cheers
Bertrand
|