[edk2-devel] [edk2-CCodingStandardsSpecification PATCH 2/2] Source Files / Spacing / Multi-line func. calls: allow condensed arguments

Michael D Kinney michael.d.kinney at intel.com
Mon Nov 14 17:07:15 UTC 2022


I disagree that they can coexist.

If uncrustify is forcing 1 arg per line, then a developer that follows a CSS that allows multiple per line, the code change will be rejected by EDK II CI.

The CSS and Uncristify behavior need to be aligned.  If we want a CSS change that requires Uncristify changes, then they have to be coordinated.

Mike

From: devel at edk2.groups.io <devel at edk2.groups.io> On Behalf Of Chang, Abner via groups.io
Sent: Sunday, November 13, 2022 5:10 PM
To: devel at edk2.groups.io; Kinney, Michael D <michael.d.kinney at intel.com>; Laszlo Ersek <lersek at redhat.com>; Kubacki, Michael <michael.kubacki at microsoft.com>
Subject: Re: [edk2-devel] [edk2-CCodingStandardsSpecification PATCH 2/2] Source Files / Spacing / Multi-line func. calls: allow condensed arguments


[AMD Official Use Only - General]

For this case, we don’t have to take another global reformatting. These two formats can coexisting without the conflict.  We just allow the condense argus format in CSS. Also, update Uncrustify to not forcing each argument at its own line.
The current Uncrustify behavior seems to me match the CCS spec. But this patch was sent to allow the multiple argus at the same line, which was not proposed to fix the issue in current Uncrustify. You sure we just close this issue?
Abner


From: devel at edk2.groups.io<mailto:devel at edk2.groups.io> <devel at edk2.groups.io<mailto:devel at edk2.groups.io>> On Behalf Of Michael D Kinney via groups.io
Sent: Monday, November 14, 2022 1:36 AM
To: devel at edk2.groups.io<mailto:devel at edk2.groups.io>; Chang, Abner <Abner.Chang at amd.com<mailto:Abner.Chang at amd.com>>; Laszlo Ersek <lersek at redhat.com<mailto:lersek at redhat.com>>; Kubacki, Michael <michael.kubacki at microsoft.com<mailto:michael.kubacki at microsoft.com>>; Kinney, Michael D <michael.d.kinney at intel.com<mailto:michael.d.kinney at intel.com>>
Subject: Re: [edk2-devel] [edk2-CCodingStandardsSpecification PATCH 2/2] Source Files / Spacing / Multi-line func. calls: allow condensed arguments

Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.

We do not want another global format change because that make git blame difficult to use.

Are any clarifications required to describe the current Uncrustify behavior?  Or is the description correct?

If the current description matches Uncristify behavior, then I recommend we close this issue as will not fix.

Mike

From: devel at edk2.groups.io<mailto:devel at edk2.groups.io> <devel at edk2.groups.io<mailto:devel at edk2.groups.io>> On Behalf Of Chang, Abner via groups.io
Sent: Sunday, November 13, 2022 12:45 AM
To: Kinney, Michael D <michael.d.kinney at intel.com<mailto:michael.d.kinney at intel.com>>; devel at edk2.groups.io<mailto:devel at edk2.groups.io>; Laszlo Ersek <lersek at redhat.com<mailto:lersek at redhat.com>>; Kubacki, Michael <michael.kubacki at microsoft.com<mailto:michael.kubacki at microsoft.com>>
Subject: Re: [edk2-devel] [edk2-CCodingStandardsSpecification PATCH 2/2] Source Files / Spacing / Multi-line func. calls: allow condensed arguments


[AMD Official Use Only - General]

Uncrustify can fix the first argument that is not at the indent with two space. It also can fix the first argument that is not at the new line.
But it also makes each argument a new line if multiple args are condensed in one line. That is what we have to update Uncrustify if we have this patch merged to CCS.

+Michael Kubacki in loop.

Abner

From: Kinney, Michael D <michael.d.kinney at intel.com<mailto:michael.d.kinney at intel.com>>
Sent: Sunday, November 13, 2022 9:58 AM
To: devel at edk2.groups.io<mailto:devel at edk2.groups.io>; Chang, Abner <Abner.Chang at amd.com<mailto:Abner.Chang at amd.com>>; Laszlo Ersek <lersek at redhat.com<mailto:lersek at redhat.com>>; Kinney, Michael D <michael.d.kinney at intel.com<mailto:michael.d.kinney at intel.com>>
Subject: RE: [edk2-devel] [edk2-CCodingStandardsSpecification PATCH 2/2] Source Files / Spacing / Multi-line func. calls: allow condensed arguments

Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.

Is this exactly what Uncrustify does now?

Mike

From: devel at edk2.groups.io<mailto:devel at edk2.groups.io> <devel at edk2.groups.io<mailto:devel at edk2.groups.io>> On Behalf Of Chang, Abner via groups.io
Sent: Saturday, November 12, 2022 5:36 PM
To: Laszlo Ersek <lersek at redhat.com<mailto:lersek at redhat.com>>; devel at edk2.groups.io<mailto:devel at edk2.groups.io>
Subject: Re: [edk2-devel] [edk2-CCodingStandardsSpecification PATCH 2/2] Source Files / Spacing / Multi-line func. calls: allow condensed arguments

Hi all,
As we are going to release CCS 2.3, we would like to address some pending issues of CCS. For this, I think we can,
- Still keep the one line per argument style in CCS although the multi-arguments in the one line style can cover this. This avoids confusion from readers and questions about if they can do the one-line per argument style.
- If the arguments are in different lines, the first argument must be indented with two spaces from the start of the function name or the member function name.
How is this?

Abner



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#96351): https://edk2.groups.io/g/devel/message/96351
Mute This Topic: https://groups.io/mt/30907266/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/edk2-devel-archive/attachments/20221114/c62a8d7c/attachment-0001.htm>


More information about the edk2-devel-archive mailing list