All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bertrand Marquis <Bertrand.Marquis@arm.com>
To: Julien Grall <julien@xen.org>
Cc: Luca Fancellu <Luca.Fancellu@arm.com>,
	xen-devel <xen-devel@lists.xenproject.org>,
	Wei Chen <Wei.Chen@arm.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	George Dunlap <george.dunlap@citrix.com>,
	Jan Beulich <jbeulich@suse.com>,
	Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wl@xen.org>
Subject: Re: [PATCH] docs/misra: Add instructions for cppcheck
Date: Fri, 24 Jun 2022 12:18:14 +0000	[thread overview]
Message-ID: <F0A0EE87-88CA-4A42-948F-D5CC4B5540DF@arm.com> (raw)
In-Reply-To: <c304be56-ae9b-121a-007e-1bb5ef06f95b@xen.org>

Hi Julien,

> On 24 Jun 2022, at 13:08, Julien Grall <julien@xen.org> wrote:
> 
> 
> 
> On 24/06/2022 12:40, Bertrand Marquis wrote:
>> Hi Julien,
> 
> Hi Bertrand,
> 
>>> On 24 Jun 2022, at 12:20, Julien Grall <julien@xen.org> 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@arm.com>
>>>> ---
>>>> 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)

> 
> Also, what do you mean by MISRA checking is not working? Is this a regression or intentional?

It is a regression.

> 
>> - older versions of cppcheck are generating wrong html or xml files
> 
> That's fine to say we don't support cppcheck < 2.7 (we do that also for the compiler).

Ok

[1] https://sourceforge.net/p/cppcheck/discussion/general/thread/bfc3ab6c41/?limit=25

Cheers
Bertrand



  reply	other threads:[~2022-06-24 12:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-24 10:53 [PATCH] docs/misra: Add instructions for cppcheck Luca Fancellu
2022-06-24 11:20 ` Julien Grall
2022-06-24 11:40   ` Bertrand Marquis
2022-06-24 12:08     ` Julien Grall
2022-06-24 12:18       ` Bertrand Marquis [this message]
2022-06-24 12:22         ` Julien Grall
2022-06-24 12:26           ` Bertrand Marquis
2022-06-24 12:01   ` Luca Fancellu
2022-06-24 12:17     ` Julien Grall
2022-06-24 13:34       ` Luca Fancellu
2022-06-24 17:25         ` Julien Grall
2022-06-28 15:23           ` Luca Fancellu
2022-06-29 10:16             ` Julien Grall
2022-06-29 10:17               ` Luca Fancellu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F0A0EE87-88CA-4A42-948F-D5CC4B5540DF@arm.com \
    --to=bertrand.marquis@arm.com \
    --cc=Luca.Fancellu@arm.com \
    --cc=Wei.Chen@arm.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=sstabellini@kernel.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.