All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien@xen.org>
To: Luca Fancellu <Luca.Fancellu@arm.com>
Cc: "Stefano Stabellini" <sstabellini@kernel.org>,
	"Nicola Vetrini" <nicola.vetrini@bugseng.com>,
	Xen-devel <xen-devel@lists.xenproject.org>,
	"michal.orzel@amd.com" <michal.orzel@amd.com>,
	"xenia.ragiadakou@amd.com" <xenia.ragiadakou@amd.com>,
	"Ayan Kumar Halder" <ayan.kumar.halder@amd.com>,
	"consulting@bugseng.com" <consulting@bugseng.com>,
	"Jan Beulich" <jbeulich@suse.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	"Henry Wang" <Henry.Wang@arm.com>,
	"Simone Ballarin" <simone.ballarin@bugseng.com>,
	"Doug Goldstein" <cardoe@cardoe.com>,
	"George Dunlap" <george.dunlap@citrix.com>,
	"Wei Liu" <wl@xen.org>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>
Subject: Re: [XEN PATCH] xen: Add SAF deviations for MISRA C:2012 Rule 7.1
Date: Wed, 11 Oct 2023 13:01:22 +0100	[thread overview]
Message-ID: <66ac185e-eace-4933-b48a-e2fe035fcb8b@xen.org> (raw)
In-Reply-To: <6BB62AEF-FCE1-412C-87DD-479319623092@arm.com>



On 11/10/2023 11:53, Luca Fancellu wrote:
> 
>>>>
>>>> Luca answered to a similar, more generic, question a few days ago about
>>>> Coverity: https://marc.info/?l=xen-devel&m=169657904027210
>>> Interesting.
>>>>
>>>> So even if we get cppcheck to work like that, we would lose Coverity
>>>> support.
>>> I think my suggestion was probably misunderstood. So let me clarify it. To cover multi-line, we could write the following in Xen:
>>> /* cppcheck tag next-3-lines */
>>> line 1
>>> line 2
>>> line 3
>>> AFAIU Eclair supports multi-line, so the tag would be transformed to there internal solution. For CPPCheck, this could be transformed to:
>>> /* cppcheck tag next-3 lines */
>>> line 1 /* generated cppcheck tag */
>>> line 2 /* generated cppcheck tag */
>>> line 3 /* generated cppcheck tag */
>>> Now, I understand that coverity doesn't support any of the two format. So the only solution would be to add the comment before each line which would impact the line numbers. This is not great, but I think this is acceptable as the context would likely help to find where this is coming from.
>>
>> Just to clarify, here I meant that for coverity, a script before the scan could convert to the multi-line version. So the line change only impact Coverity.
> 
> Hi Julien,
> 
> We’ve tried to avoid that because when the tool insert lines, the resultant report would give wrong lines numbers if any violation is reported after the
> insertion points. So there will be a mismatch between the codebase and the report findings from some point on in the file.

I know. Stefano already pointed that out. But as I wrote, I don't think 
this is a big problem as it only affecte one tool (Coverity) and one 
would still be able to find the exact place based on the context.

Cheers,

-- 
Julien Grall


  reply	other threads:[~2023-10-11 12:01 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-03 15:37 [XEN PATCH] xen: Add SAF deviations for MISRA C:2012 Rule 7.1 Nicola Vetrini
2023-10-03 16:17 ` andrew.cooper3
2023-10-03 17:14   ` Luca Fancellu
2023-10-03 17:27     ` Andrew Cooper
2023-10-03 18:21       ` Stefano Stabellini
2023-10-03 20:46 ` Stefano Stabellini
2023-10-04  9:56   ` andrew.cooper3
2023-10-04 10:06     ` Luca Fancellu
2023-10-04 10:29       ` Nicola Vetrini
2023-10-04 10:52         ` Luca Fancellu
2023-10-04 11:17           ` Andrew Cooper
2023-10-04 11:36             ` Luca Fancellu
2023-10-04 12:23           ` Nicola Vetrini
2023-10-04 23:32           ` Stefano Stabellini
2023-10-05  7:35             ` Luca Fancellu
2023-10-06  1:02               ` Stefano Stabellini
2023-10-06  7:58                 ` Luca Fancellu
2023-10-07  0:43                   ` Stefano Stabellini
2023-10-09  8:09                     ` Luca Fancellu
2023-10-09  8:51                     ` Julien Grall
2023-10-09 22:19                       ` Stefano Stabellini
2023-10-10  7:29                         ` Luca Fancellu
2023-10-10  9:04                           ` Nicola Vetrini
2023-10-10 10:46                         ` Julien Grall
2023-10-10 23:39                           ` Stefano Stabellini
2023-10-11  9:45                             ` Julien Grall
2023-10-11  9:51                               ` Julien Grall
2023-10-11 10:53                                 ` Luca Fancellu
2023-10-11 12:01                                   ` Julien Grall [this message]
2023-10-12 23:17                                     ` Stefano Stabellini
2023-10-16  9:40             ` Jan Beulich

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=66ac185e-eace-4933-b48a-e2fe035fcb8b@xen.org \
    --to=julien@xen.org \
    --cc=Henry.Wang@arm.com \
    --cc=Luca.Fancellu@arm.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ayan.kumar.halder@amd.com \
    --cc=cardoe@cardoe.com \
    --cc=consulting@bugseng.com \
    --cc=george.dunlap@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=michal.orzel@amd.com \
    --cc=nicola.vetrini@bugseng.com \
    --cc=roger.pau@citrix.com \
    --cc=simone.ballarin@bugseng.com \
    --cc=sstabellini@kernel.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    --cc=xenia.ragiadakou@amd.com \
    /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.