All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien@xen.org>
To: Jan Beulich <jbeulich@suse.com>
Cc: Bertrand Marquis <Bertrand.Marquis@arm.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	"andrew.cooper3@citrix.com" <andrew.cooper3@citrix.com>,
	"roger.pau@citrix.com" <roger.pau@citrix.com>,
	"George.Dunlap@citrix.com" <George.Dunlap@citrix.com>,
	Stefano Stabellini <stefano.stabellini@xilinx.com>,
	Stefano Stabellini <sstabellini@kernel.org>
Subject: Re: [PATCH 1/2] docs/misra: introduce rules.rst
Date: Mon, 30 May 2022 10:27:08 +0100	[thread overview]
Message-ID: <0cc9c342-f355-5816-09e9-a996624c6a79@xen.org> (raw)
In-Reply-To: <5b790260-dd5c-9f62-7151-7684a0dc18fa@suse.com>

Hi,

On 30/05/2022 10:16, Jan Beulich wrote:
> On 30.05.2022 11:12, Julien Grall wrote:
>> On 28/05/2022 00:16, Stefano Stabellini wrote:
>>> """
>>> It is possible that in specific circumstances it is best not to follow a
>>> rule because it is not possible or because the alternative leads to
>>> better code quality. Those cases are called "deviations". They are
>>> permissible as long as they are documented, either as an in-code comment
>>> or as part of the commit message. Other documentation mechanisms are
>>
>> I would drop the "as part of the commit message" because it is a lot
>> more difficult to associate the deviation with a rationale (the code may
>> have been moved and you would need to go through the history).
> 
> But this was added in response to me pointing out that code comments
> aren't standardized yet as to their format. The alternative, as said
> before, would be to come up with a scheme first, before starting to
> mandate playing by certain of the rules (and hence requiring deviations
> to be documented).

I don't think this is necessary short term. It is easy to rework a 
comment after the fact. It is a lot more difficult to go through the 
history and find the rationale.

Documenting the deviation in the commit message also makes a lot more 
difficult to triage issues reported by scanner. With a comment you could 
just read it from the same "page" (scanner will usually provide context).

So overall, I think allowing to document deviations in a commit message 
is a pretty bad move (the more if it is a short term solution).

Cheers,

-- 
Julien Grall


  reply	other threads:[~2022-05-30  9:27 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-25  0:34 [PATCH 0/2] introduce docs/misra/rules.rst Stefano Stabellini
2022-05-25  0:35 ` [PATCH 1/2] docs/misra: introduce rules.rst Stefano Stabellini
2022-05-25  7:39   ` Julien Grall
2022-05-26  1:02     ` Stefano Stabellini
2022-05-26  9:43       ` Jan Beulich
2022-05-26  9:54         ` Bertrand Marquis
2022-05-26 10:15           ` Jan Beulich
2022-05-26 13:04             ` Bertrand Marquis
2022-05-26 19:57               ` Stefano Stabellini
2022-05-27  6:56                 ` Jan Beulich
2022-05-27 23:16                   ` Stefano Stabellini
2022-05-30  8:37                     ` Jan Beulich
2022-05-30  9:12                     ` Julien Grall
2022-05-30  9:16                       ` Jan Beulich
2022-05-30  9:27                         ` Julien Grall [this message]
2022-05-30  9:33                           ` Jan Beulich
2022-05-30  9:41                             ` Julien Grall
2022-05-30  9:55                               ` Jan Beulich
2022-05-30 10:21                                 ` George Dunlap
2022-05-30 13:35                                   ` Bertrand Marquis
2022-05-31  9:41                                     ` Julien Grall
2022-06-01  1:25                                       ` Stefano Stabellini
2022-05-25  8:25   ` Jan Beulich
2022-05-26  1:12     ` Stefano Stabellini
2022-05-26  9:36       ` Jan Beulich
2022-05-26 19:57         ` Stefano Stabellini
2022-05-25 12:21   ` Andrew Cooper
2022-05-26  1:57     ` Stefano Stabellini
2022-05-25  0:35 ` [PATCH 2/2] docs/misra: add Rule 5.1 Stefano Stabellini
2022-05-25  7:40   ` Julien Grall
2022-05-25 12:26     ` Andrew Cooper
2022-05-25  8:08   ` Jan Beulich
2022-05-26  1:18     ` Stefano Stabellini
2022-05-26  9:40       ` Jan Beulich
2022-05-26 10:10         ` Bertrand Marquis
2022-05-26 19:58         ` Stefano Stabellini

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=0cc9c342-f355-5816-09e9-a996624c6a79@xen.org \
    --to=julien@xen.org \
    --cc=Bertrand.Marquis@arm.com \
    --cc=George.Dunlap@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=stefano.stabellini@xilinx.com \
    --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.