[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: Fri, 24 Jun 2022 12:01: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=7jd8//NOB/wkSRvn3P02c9SAujR4bW0+bEv8An+j39g=; b=Juv1i2nFd8aRyWI3pYYlY3W6N/ritwrj2MJmogBZe05/m2+XLhR1JYfOrmv8/N2AgCytWcjJ8cq3H5stTmg1Qjk0UZBO+Qt45BU2QsploUYdNhLxxDu6kjRJhrMHu2jb3aPJEHLZ74BtvXUjYryqn+vOQWy1ljHT5URLH4KCkgvFYZ/VVNdRIjPcPnGN+zA/x2xz46ku3+ImtkoXliBx3owgAMx4FdIctkr+BmcTQHEFswXzJrPKpooOv9ZtSccCpIahlLcfFOjeptOEl77E+RLfoMydPBELXF9pzDKJ7MS/dmNy8jdIOfBPlVLpiXfhBVj/Xo3mLksvWwtu47W0eQ==
- 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=7jd8//NOB/wkSRvn3P02c9SAujR4bW0+bEv8An+j39g=; b=f0t3lFusfjVdCbPyK2nPwhV+ZDAe4PVKhZfiVcdHxe5alpl/7DVaoltu4SuZ0u0WElQ2HziuxJw0el9ShjC2v3sBQqOalY5V3r19xj6p+o2H+hH12Yw8/3Y1VkfQPzRLD9wIMj234ONY050KV5Qr7iqYVGwcfwvccL4zT3PV2B8r8qFNw3x1nCiU7c9mfIPAfXjp6lq6rzlgAhxUyps98FZspY+OpWZRfC9gP71AYEYiN5SJImlWdBIoNB7A98ltg9naDRy4VNyjOMYCW4iWnveGfKVwDV4dRqpyU+WbuupLTzx/hCV++CmgGFGVKKsjISldUXJiTp8s98aKWBM/bw==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=OMMOtuHJE1JkuYl77yrA+O57DDZCTw9z5W+gk2S+w3hTcs1Ll49ThYC0EKJV+mDI0Yz07RPeHsOP+BxQfxtITgyDjMnFR3u9vck7f9QrR0oVgTTMm8l7hJlxic6jG/PsjAGoGVy+nRjAvEJ5SSFRrWpG7+ihGy+vwXFHiyYZTWkgWiI/qJ6WRmKNqGNrBe8OjtWqqFK2lqwgY4xYPHaE6sVUVTa6Sos6qhtuTE7EvTmjvBFja/8XAQ0FKaJIIZgY/pi/yEIHVZuGRPCWUfGQmCPdI8yEBLTQ2ORHJ5QHL4b4I5tVw6HpH7Xm4aS8XZo5KUpo9zjNOZAJIodPAYRJ3Q==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ew5lWkZ9yaH1+6W5g8RrbOG4KEzX+IK8povoTQDWxHhPnmp5LwYALEy4vp804iwt/a0XISdYgyS+8Xg76ZWSKpVgY9Qkb5J1n+SgB3aokD11kxi5+v/Y4OjX+xQh/cuUx1pP8IGxCqG20tp1g8ur4nqonCc8qIYY45pNB5TNM211N0bf/+26rtZdqvw7h8rXTZD3Cf48rloA/8e1YfXw0Nj+lGxj5lthszC1Sh8Erob97MBUpHhBe3yHNr/89AO8W7GInocn1wvylTDlW/A1fsD3PUb87zejvvYmJ8GSJ0Bop9SjP6YayDWLkR7zM2LblhG+cK8GLjosfWttJNksQQ==
- 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: Fri, 24 Jun 2022 12:02:40 +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/0Gr0RGCgDxGeq1eaYGAgAALcIA=
- Thread-topic: [PATCH] docs/misra: Add instructions for cppcheck
Hi Julien,
>> +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.
Yes I understand, but as Bertrand says, other version of this tool doesn’t work
quite well. I agree that everyone should use their own version, but for the
sake of reproducibility
of the findings, I think we should have a common ground. The community can
however propose from time to time to bump the version as long as we can say it
works (maybe
crossing the reports between cppcheck, eclair, other proprietary tools).
>
>> +
>> +Install cppcheck in the system
>
> NIT: s/in/on/ I think.
Sure will fix
>
>> +==============================
>> +
>> +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, here the complete command line:
>> +
>> +make MATCHCOMPILER=yes \
>> + FILESDIR=/usr/share/cppcheck \
>> + CFGDIR=/usr/share/cppcheck/cfg \
>> + HAVE_RULES=yes \
>> + CXXFLAGS="-O2 -DNDEBUG -Wall -Wno-sign-compare -Wno-unused-function" \
>> + install
>
> Let me start that I am not convinced that our documentation should explain
> how to build cppcheck.
>
> But if that's desire, then I think you ought to explain why we need to update
> CXXFLAGS (I would expect cppcheck to build everywhere without specifying
> additional flags).
Yes you are right, this is the recommended command line for building as in
https://github.com/danmar/cppcheck/blob/main/readme.md section GNU make, I can
add the source.
My intention when writing this page was to have a common ground between Xen
developers, so that if one day someone came up with a fix for something, we are
able to reproduce
the finding all together.
Cheers,
Luca
>
> Cheers,
>
> --
> Julien Grall
|