From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ua1-f41.google.com (mail-ua1-f41.google.com [209.85.222.41]) by mx.groups.io with SMTP id smtpd.web10.1061.1637113629010488949 for ; Tue, 16 Nov 2021 17:47:09 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=l+2bXsUh; spf=pass (domain: gmail.com, ip: 209.85.222.41, mailfrom: pedro.falcato@gmail.com) Received: by mail-ua1-f41.google.com with SMTP id y5so2344545ual.7 for ; Tue, 16 Nov 2021 17:47:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xIE145hy+lkdGVTqZIYV3eqwfQzpdYPqYm+mMMf/RZE=; b=l+2bXsUhxAlgJgPI4vc+BG7x+P5eDYK9tyqWIsVAYv00KDi5M3/6rsXaTuB4cnsWpE AgIy4V8uXQK+S820Dz1/qTusEM/PvKoWtuCHsGDX9+Dw6hFA420GlCCD4kicQutmAICm FIY3LtrwLOymM6YpUKLlKwO0T+OmPfcBDQdTqfz2wyqiliFT2KKz4y41PLVLbjHY+QV+ iMSjTO2RxQ+QLCaMekzk9GjsAJirVDOlx9npHtUFdjIMDb+u7Hu9LU3nOQ+Ezfjy0w16 benwj8DooZR/FyePWVpc4A9VRTQQrh+vSAMIgTTSThsdEzvCIJd925qrMk2P636QLLCl gr1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xIE145hy+lkdGVTqZIYV3eqwfQzpdYPqYm+mMMf/RZE=; b=LiDV13hAaUxSylLVrYtI6n3Lj1w6dXVnkeGDOt7p0SuSdsJ2OcD4md+PDNAxvDBz39 PtNLx1SU/HrB/OTt4JGVIxCrznP2Xqiwc003Od7c1Ud2fiO9xeCyd+WUGwbNe24mGIfY 1l3uelGBzz6lM4bBdhGISIABL9kfYckEzFdOAlloRqA1eZfjejjD1tFe/18Y4Tx4JqMk E8omTyf86Utz1GMj9yY1yJOhUdF25M4N4aT3zeMKt1DYevPGpMtIhQMVGaoiHXIOeT0R vmMuh73MV4hWob7Xo12wDwTNJ19jg4EDN/+Ud4rdRN0IqUtYkjzxG2VtUtCqLLc8UTf9 Aj/Q== X-Gm-Message-State: AOAM532C/qdStnbZuS7elS1hykHSvlzmyQshUwPmeyIYNUnvOCR+6uYc 4Qr/saBtlW34rKLLe9F0h5Dw53YGpcmcDN0ewwKzmzNkfWvdqw== X-Google-Smtp-Source: ABdhPJyNk/2+ZHUYvhelpGJNdl0Stsua3b57AhVdwgblokUfVFzrO819tMDPFOjWp3sbjbN84TlWk1WNOrFenYjAp7A= X-Received: by 2002:a67:f805:: with SMTP id l5mr62470433vso.17.1637113628033; Tue, 16 Nov 2021 17:47:08 -0800 (PST) MIME-Version: 1.0 References: <42fc968b-0108-da06-42a4-d946f0592072@linux.microsoft.com> <6ef9d0eb-942f-943b-5a01-ca7602d31459@linux.microsoft.com> <2d02dd86-8524-9744-ecc1-d52d3881b3fb@linux.microsoft.com> In-Reply-To: <2d02dd86-8524-9744-ecc1-d52d3881b3fb@linux.microsoft.com> From: "Pedro Falcato" Date: Wed, 17 Nov 2021 01:46:54 +0000 Message-ID: Subject: Re: [edk2-devel] Uncrustify configuration file and file/function templates To: Michael Kubacki Cc: edk2-devel-groups-io Content-Type: multipart/alternative; boundary="00000000000041867805d0f23817" --00000000000041867805d0f23817 Content-Type: text/plain; charset="UTF-8" If you're curious, you can look at my Ext4Pkg ( https://github.com/tianocore/edk2-platforms/tree/master/Features/Ext4Pkg/Ext4Dxe) to look at the effects of align_func_params_gap and align_func_params_span = 2. Things look okay and similar to other edk2-styled code. Best regards, Pedro On Tue, Nov 16, 2021 at 11:54 PM Michael Kubacki < mikuback@linux.microsoft.com> wrote: > The poc_5 branch config file is based on the file I'm pushing to the > Uncrustify fork soon: > > https://dev.azure.com/projectmu/Uncrustify/_git/Uncrustify/pullrequest/24?_a=files&path=/etc/edk2.cfg > > So they're already being used and the file in the poc_5 branch was of > course used to generate the results in the branch. > > Note that I do have "align_func_params" set to true. I believe I saw > some occasional anomalies in the past when I set > "align_func_params_span" and the gap to larger values but I don't recall > exactly what they were. I'd be happy to try that again soon though. > > On 11/16/2021 6:30 PM, Pedro Falcato wrote: > > Yes, I do. > > > > Essentially, my changes make it so the function parameters are aligned > > and there are always two spaces between the parameter's type and name; > > it also adds spaces between control statements, as you mentioned. > > "force" instead of "add" for sp_before_sparen is a good idea though. > > I assume these are good additions to the "upstream" edk2.cfg? > > > > On Tue, Nov 16, 2021 at 11:20 PM Michael Kubacki > > > > wrote: > > > > Hi Pedro, > > > > By "new config", do you mean the config file in the latest branch > > > https://github.com/makubacki/edk2/blob/uncrustify_poc_5/uncrustify.cfg > > < > https://github.com/makubacki/edk2/blob/uncrustify_poc_5/uncrustify.cfg>)? > > > > The main difference I see from the diff in that gist and poc_5 is > that > > "align_func_params_gap" and "align_func_params_span" are two instead > of > > zero. > > > > The value "force" instead of "add" for "sp_before_sparen" will > ensure a > > single space is always added between a control statement and the > > parenthesis. > > > > Thanks, > > Michael > > > > On 11/16/2021 6:05 PM, Pedro Falcato wrote: > > > Hi, > > > > > > RE: Uncrustify's configuration > > > > > > I had made a few changes to the config file, when trying out > > Uncrustify, > > > a few months ago, on Mike Kinney's suggestion. In my experience, > > the new > > > config file reflects the edk2 coding style better. > > > > > > In particular, it adds spaces between things like 'if' and the > > > parenthesis, and better aligns functions' parameters. > > > Feel free to check out the diff: > > > https://gist.github.com/heatd/5bb048a188726cb8bc9f5b4a844b0ec2 > > > > > > >. > > > There's a bit of diff noise due to it being based on > > > > > https://dev.azure.com/projectmu/_git/Uncrustify?path=/etc/edk2.cfg > > > > > > > > > > but > > > > > diffed on > > > > > > https://github.com/makubacki/edk2/blob/uncrustify_poc_2/.uncrustify/edk2.cfg > > < > https://github.com/makubacki/edk2/blob/uncrustify_poc_2/.uncrustify/edk2.cfg > > > > > > > > > < > https://github.com/makubacki/edk2/blob/uncrustify_poc_2/.uncrustify/edk2.cfg > > < > https://github.com/makubacki/edk2/blob/uncrustify_poc_2/.uncrustify/edk2.cfg > >>. > > > > > > Thanks, > > > Pedro > > > > > > On Tue, Nov 16, 2021 at 7:26 PM Michael Kubacki > > > > > > > >> wrote: > > > > > > I think that makes sense. I will look into it further and let > > you know > > > if there's any downsides found. > > > > > > On 11/16/2021 2:18 PM, Kinney, Michael D wrote: > > > > Could we add this feature to the Uncrustify CI Plugin? > > > > > > > > Mike > > > > > > > >> -----Original Message----- > > > >> From: Michael Kubacki > > > > > >> > > > >> Sent: Tuesday, November 16, 2021 10:54 AM > > > >> To: devel@edk2.groups.io > > >; Kinney, > > > Michael D > > > > > >> > > > >> Subject: Re: [edk2-devel] Uncrustify configuration file > and > > > file/function templates > > > >> > > > >> I would prefer to have a single version of the file if > > possible to > > > >> reduce synchronization issues across the two copies. > > > >> > > > >> It seems that a CI plugin to read the contents of the > > template > > > files and > > > >> search incoming code for that text wouldn't be too > > difficult to > > > add as a > > > >> new plugin. > > > >> > > > >> Thanks, > > > >> Michael > > > >> > > > >> On 11/16/2021 1:31 PM, Michael D Kinney wrote: > > > >>> Hi Michael, > > > >>> > > > >>> Should we have 2 versions of the config file? > > > >>> > > > >>> One used by automation tools such as CI and git hooks > > that do > > > not use the > > > >>> templates. > > > >>> > > > >>> And another one that a developer can optionally use that > > will > > > add the > > > >>> templates for missing file/function headers that the > > developer > > > then needs > > > >>> to fill out. > > > >>> > > > >>> One concern I have about the templates is if they get > > used but > > > a developer > > > >>> does not fill in the missing information. It would be > > best if > > > a CI check > > > >>> rejects a file/function header that has not been filled > in. > > > >>> > > > >>> Mike > > > >>> > > > >>>> -----Original Message----- > > > >>>> From: devel@edk2.groups.io > > > > > > > > > >> On > > Behalf Of > > > Michael Kubacki > > > >>>> Sent: Tuesday, November 16, 2021 10:25 AM > > > >>>> To: devel@edk2.groups.io > > >; > > > Kinney, Michael D > > > > > >> > > > >>>> Subject: Re: [edk2-devel] Uncrustify configuration file > and > > > file/function templates > > > >>>> > > > >>>> Hi Mike, > > > >>>> > > > >>>> Those were just disabled because I typically run a > separate > > > invocation > > > >>>> of Uncrustify with them enabled to isolate code which > > is missing > > > >>>> file/function headers. My thought was the templates are > > > helpful but we > > > >>>> would need to individually identify where they are > > placed to > > > file TCBZs > > > >>>> for maintainers to replace the template with the actual > > > information. > > > >>>> > > > >>>> In some of my previous poc branches (like > > > >>>> > > > > > > https://github.com/makubacki/edk2/commits/uncrustify_poc_3_with_headers > > < > https://github.com/makubacki/edk2/commits/uncrustify_poc_3_with_headers> > > > > > < > https://github.com/makubacki/edk2/commits/uncrustify_poc_3_with_headers < > https://github.com/makubacki/edk2/commits/uncrustify_poc_3_with_headers > >>), > > > I > > > >>>> also pushed a branch with those results. > > > >>>> > > > >>>> So I do think we would want them enabled in the final > > config > > > file. We > > > >>>> can also review the contents of the templates in the > future > > > patch series > > > >>>> to see if any changes are recommended. > > > >>>> > > > >>>> I prefer using a .uncrustify directory to help group > > related > > > collateral > > > >>>> but I don't have a strong opinion there. > > > >>>> > > > >>>> Thanks, > > > >>>> Michael > > > >>>> > > > >>>> On 11/16/2021 12:16 PM, Michael D Kinney wrote: > > > >>>>> Hi Michael, > > > >>>>> > > > >>>>> In your POC branch > > > (https://github.com/makubacki/edk2/tree/uncrustify_poc_5 > > > > > > >), I see > the > > > >>>>> uncrustify.cfg configuration file in the root. > > > >>>>> > > > >>>>> > > > > > > https://github.com/makubacki/edk2/blob/uncrustify_poc_5/uncrustify.cfg > > < > https://github.com/makubacki/edk2/blob/uncrustify_poc_5/uncrustify.cfg> > > > > > < > https://github.com/makubacki/edk2/blob/uncrustify_poc_5/uncrustify.cfg < > https://github.com/makubacki/edk2/blob/uncrustify_poc_5/uncrustify.cfg>> > > > >>>>> > > > >>>>> However, in your Wiki, you provide examples where this > > > configuration file is in an > > > >>>>> .uncrustify directory > > > >>>>> > > > >>>>> > > > > > > https://dev.azure.com/projectmu/Uncrustify/_wiki/wikis/Uncrustify.wiki/1/Project-Mu-(EDK-II)-Fork-Readme > > < > https://dev.azure.com/projectmu/Uncrustify/_wiki/wikis/Uncrustify.wiki/1/Project-Mu-(EDK-II)-Fork-Readme > > > > > > > < > https://dev.azure.com/projectmu/Uncrustify/_wiki/wikis/Uncrustify.wiki/1/Project-Mu-(EDK-II)-Fork-Readme > < > https://dev.azure.com/projectmu/Uncrustify/_wiki/wikis/Uncrustify.wiki/1/Project-Mu-(EDK-II)-Fork-Readme > >> > > > >>>>> > > > >>>>> The uncrustify.cfg files also contains commented out > > settings > > > for the file header > > > >>>>> and function header templates. > > > >>>>> > > > >>>>> # cmt_insert_file_header = > > > default_file_header.txt > > > >>>>> # cmt_insert_func_header = > > > default_function_header.txt > > > >>>>> > > > >>>>> Are these disabled on purpose? > > > >>>>> > > > >>>>> Do we want to enable them? If so, should the > uncrustify > > > configuration file > > > >>>>> and the templates go into a .uncrustify directory? > > > >>>>> > > > >>>>> Thanks, > > > >>>>> > > > >>>>> Mike > > > >>>>> > > > >>>>> > > > >>>>> > > > >>>>> > > > >>>>> > > > >>>>> > > > >>>>> > > > >>>> > > > >>>> > > > >>>> > > > >>>> > > > >>> > > > >>> > > > >>> > > > >>> > > > >>> > > > >>> > > > > > > > > > > > > > > > > > > > > > > > > -- > > > Pedro Falcato > > > > > > > > > > > -- > > Pedro Falcato > -- Pedro Falcato --00000000000041867805d0f23817 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
If you're curious, you can look at my Ext4Pkg (https://github.com/tianocore/edk2-platforms/tree/master/Features= /Ext4Pkg/Ext4Dxe) to look at the effects of=C2=A0align_func_params_gap = and=C2=A0align_func_params_span =3D 2. Things look
okay and similar to = other=C2=A0edk2-styled code.

Best regards,
Pedro

On Tue, Nov 16, 2021 at 11:54 PM Michael Kubacki <mikuback@linux.microsoft.com&= gt; wrote:
The p= oc_5 branch config file is based on the file I'm pushing to the
Uncrustify fork soon:
https://dev.azure.com/projectmu/Uncrustify/_git/Uncrustify/pullreq= uest/24?_a=3Dfiles&path=3D/etc/edk2.cfg

So they're already being used and the file in the poc_5 branch was of <= br> course used to generate the results in the branch.

Note that I do have "align_func_params" set to true. I believe I = saw
some occasional anomalies in the past when I set
"align_func_params_span" and the gap to larger values but I don&#= 39;t recall
exactly what they were. I'd be happy to try that again soon though.

On 11/16/2021 6:30 PM, Pedro Falcato wrote:
> Yes, I do.
>
> Essentially, my changes make it so the function parameters are aligned=
> and there are always two spaces between the parameter's type and n= ame;
> it also adds spaces between control statements, as you mentioned.
> "force" instead of "add" for sp_before_sparen is a= good idea though.
> I assume these are good additions to the "upstream" edk2.cfg= ?
>
> On Tue, Nov 16, 2021 at 11:20 PM Michael Kubacki
> <= mikuback@linux.microsoft.com <mailto:mikuback@linux.microsoft.com>>= wrote:
>
>=C2=A0 =C2=A0 =C2=A0Hi Pedro,
>
>=C2=A0 =C2=A0 =C2=A0By "new config", do you mean the config f= ile in the latest branch
>=C2=A0 =C2=A0 =C2=A0https:= //github.com/makubacki/edk2/blob/uncrustify_poc_5/uncrustify.cfg
>=C2=A0 =C2=A0 =C2=A0<ht= tps://github.com/makubacki/edk2/blob/uncrustify_poc_5/uncrustify.cfg>= ;)?
>
>=C2=A0 =C2=A0 =C2=A0The main difference I see from the diff in that gis= t and poc_5 is that
>=C2=A0 =C2=A0 =C2=A0"align_func_params_gap" and "align_f= unc_params_span" are two instead of
>=C2=A0 =C2=A0 =C2=A0zero.
>
>=C2=A0 =C2=A0 =C2=A0The value "force" instead of "add&qu= ot; for "sp_before_sparen" will ensure a
>=C2=A0 =C2=A0 =C2=A0single space is always added between a control stat= ement and the
>=C2=A0 =C2=A0 =C2=A0parenthesis.
>
>=C2=A0 =C2=A0 =C2=A0Thanks,
>=C2=A0 =C2=A0 =C2=A0Michael
>
>=C2=A0 =C2=A0 =C2=A0On 11/16/2021 6:05 PM, Pedro Falcato wrote:
>=C2=A0 =C2=A0 =C2=A0 > Hi,
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0 > RE: Uncrustify's configuration
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0 > I had made a few changes to the config file, = when trying out
>=C2=A0 =C2=A0 =C2=A0Uncrustify,
>=C2=A0 =C2=A0 =C2=A0 > a few months ago, on Mike Kinney's sugges= tion. In my experience,
>=C2=A0 =C2=A0 =C2=A0the new
>=C2=A0 =C2=A0 =C2=A0 > config file reflects the edk2 coding style be= tter.
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0 > In particular, it adds spaces between things = like 'if' and the
>=C2=A0 =C2=A0 =C2=A0 > parenthesis, and better aligns functions'= parameters.
>=C2=A0 =C2=A0 =C2=A0 > Feel free to check out the diff:
>=C2=A0 =C2=A0 =C2=A0 > https://= gist.github.com/heatd/5bb048a188726cb8bc9f5b4a844b0ec2
>=C2=A0 =C2=A0 =C2=A0<https://gi= st.github.com/heatd/5bb048a188726cb8bc9f5b4a844b0ec2>
>=C2=A0 =C2=A0 =C2=A0 > <http= s://gist.github.com/heatd/5bb048a188726cb8bc9f5b4a844b0ec2
>=C2=A0 =C2=A0 =C2=A0<https://gi= st.github.com/heatd/5bb048a188726cb8bc9f5b4a844b0ec2>>.
>=C2=A0 =C2=A0 =C2=A0 > There's a bit of diff noise due to it bei= ng based on
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0https://= dev.azure.com/projectmu/_git/Uncrustify?path=3D/etc/edk2.cfg
>=C2=A0 =C2=A0 =C2=A0<http= s://dev.azure.com/projectmu/_git/Uncrustify?path=3D/etc/edk2.cfg> >=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0<http= s://dev.azure.com/projectmu/_git/Uncrustify?path=3D/etc/edk2.cfg
>=C2=A0 =C2=A0 =C2=A0<http= s://dev.azure.com/projectmu/_git/Uncrustify?path=3D/etc/edk2.cfg>>= ; but
>
>=C2=A0 =C2=A0 =C2=A0 > diffed on
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0= https://github.com/makubacki/edk2/blob/uncrustify_poc_2/.uncrustify/edk2.cf= g
>=C2=A0 =C2=A0 =C2=A0<https://github.com/makubacki/edk2/blob/uncrustify_poc_2/.uncrustify/edk= 2.cfg>
>
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0<https://github.com/makubacki/edk2/blob/uncrustify_poc_2/.uncrustify/edk= 2.cfg
>=C2=A0 =C2=A0 =C2=A0<https://github.com/makubacki/edk2/blob/uncrustify_poc_2/.uncrustify/edk= 2.cfg>>.
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0 > Thanks,
>=C2=A0 =C2=A0 =C2=A0 > Pedro
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0 > On Tue, Nov 16, 2021 at 7:26 PM Michael Kubac= ki
>=C2=A0 =C2=A0 =C2=A0 > <mikuback@linux.microsoft.com
>=C2=A0 =C2=A0 =C2=A0<mailto:mikuback@linux.microsoft.com>
>=C2=A0 =C2=A0 =C2=A0<mailto:mikuback@linux.microsoft.com
>=C2=A0 =C2=A0 =C2=A0<mailto:mikuback@linux.microsoft.com>>> wrot= e:
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0I think that makes sense. = I will look into it further and let
>=C2=A0 =C2=A0 =C2=A0you know
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0if there's any downsid= es found.
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0On 11/16/2021 2:18 PM, Kin= ney, Michael D wrote:
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 > Could we add this fe= ature to the Uncrustify CI Plugin?
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 > Mike
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >> -----Original Me= ssage-----
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >> From: Michael Ku= backi <mikuback@linux.microsoft.com
>=C2=A0 =C2=A0 =C2=A0<mailto:mikuback@linux.microsoft.com>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0<mailto:mikuback@linux.microsoft= .com
>=C2=A0 =C2=A0 =C2=A0<mailto:mikuback@linux.microsoft.com>>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >> Sent: Tuesday, N= ovember 16, 2021 10:54 AM
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >> To: devel@edk2.groups.io <= mailto:devel@edk2= .groups.io>
>=C2=A0 =C2=A0 =C2=A0<mailto:devel@edk2.groups.io <mailto:devel@edk2.groups.io>>; Kinn= ey,
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0Michael D <michael.d.kinney@intel.= com
>=C2=A0 =C2=A0 =C2=A0<mailto:michael.d.kinney@intel.com>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0<mailto:michael.d.kinney@intel.com=
>=C2=A0 =C2=A0 =C2=A0<mailto:michael.d.kinney@intel.com>>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >> Subject: Re: [ed= k2-devel] Uncrustify configuration file and
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0file/function templates >=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >> I would prefer t= o have a single version of the file if
>=C2=A0 =C2=A0 =C2=A0possible to
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >> reduce synchroni= zation issues across the two copies.
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >> It seems that a = CI plugin to read the contents of the
>=C2=A0 =C2=A0 =C2=A0template
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0files and
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >> search incoming = code for that text wouldn't be too
>=C2=A0 =C2=A0 =C2=A0difficult to
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0add as a
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >> new plugin.
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >> Thanks,
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >> Michael
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >> On 11/16/2021 1:= 31 PM, Michael D Kinney wrote:
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>> Hi Michael,<= br> >=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>> Should we ha= ve 2 versions of the config file?
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>> One used by = automation tools such as CI and git hooks
>=C2=A0 =C2=A0 =C2=A0that do
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0not use the
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>> templates. >=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>> And another = one that a developer can optionally use that
>=C2=A0 =C2=A0 =C2=A0will
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0add the
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>> templates fo= r missing file/function headers that the
>=C2=A0 =C2=A0 =C2=A0developer
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0then needs
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>> to fill out.=
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>> One concern = I have about the templates is if they get
>=C2=A0 =C2=A0 =C2=A0used but
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0a developer
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>> does not fil= l in the missing information.=C2=A0 It would be
>=C2=A0 =C2=A0 =C2=A0best if
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0a CI check
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>> rejects a fi= le/function header that has not been filled in.
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>> Mike
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>> -----Ori= ginal Message-----
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>> From: devel@edk2.groups.i= o
>=C2=A0 =C2=A0 =C2=A0<mailto:devel@edk2.groups.io> <mailto:devel@edk2.groups.io
>=C2=A0 =C2=A0 =C2=A0<mailto:devel@edk2.groups.io>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0<devel@edk2.groups.io <mailto:devel@edk2.groups.io= >
>=C2=A0 =C2=A0 =C2=A0<mailto:devel@edk2.groups.io <mailto:devel@edk2.groups.io>>> O= n
>=C2=A0 =C2=A0 =C2=A0Behalf Of
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0Michael Kubacki
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>> Sent: Tu= esday, November 16, 2021 10:25 AM
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>> To: devel@edk2.groups.io<= /a> <mailto:de= vel@edk2.groups.io>
>=C2=A0 =C2=A0 =C2=A0<mailto:devel@edk2.groups.io <mailto:devel@edk2.groups.io>>;
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0Kinney, Michael D <michael.d.kinne= y@intel.com
>=C2=A0 =C2=A0 =C2=A0<mailto:michael.d.kinney@intel.com>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0<mailto:michael.d.kinney@intel.com=
>=C2=A0 =C2=A0 =C2=A0<mailto:michael.d.kinney@intel.com>>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>> Subject:= Re: [edk2-devel] Uncrustify configuration file and
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0file/function templates >=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>> Hi Mike,=
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>> Those we= re just disabled because I typically run a separate
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0invocation
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>> of Uncru= stify with them enabled to isolate code which
>=C2=A0 =C2=A0 =C2=A0is missing
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>> file/fun= ction headers. My thought was the templates are
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0helpful but we
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>> would ne= ed to individually identify where they are
>=C2=A0 =C2=A0 =C2=A0placed to
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0file TCBZs
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>> for main= tainers to replace the template with the actual
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0information.
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>> In some = of my previous poc branches (like
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0https= ://github.com/makubacki/edk2/commits/uncrustify_poc_3_with_headers
>=C2=A0 =C2=A0 =C2=A0<h= ttps://github.com/makubacki/edk2/commits/uncrustify_poc_3_with_headers&= gt;
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0 =C2=A0<https://github.com/makubacki/edk2/commits/uncrustify_poc_3_with_heade= rs <https://github.com= /makubacki/edk2/commits/uncrustify_poc_3_with_headers>>),
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0I
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>> also pus= hed a branch with those results.
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>> So I do = think we would want them enabled in the final
>=C2=A0 =C2=A0 =C2=A0config
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0file. We
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>> can also= review the contents of the templates in the future
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0patch series
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>> to see i= f any changes are recommended.
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>> I prefer= using a .uncrustify directory to help group
>=C2=A0 =C2=A0 =C2=A0related
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0collateral
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>> but I do= n't have a strong opinion there.
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>> Thanks,<= br> >=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>> Michael<= br> >=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>> On 11/16= /2021 12:16 PM, Michael D Kinney wrote:
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>> Hi M= ichael,
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>> In y= our POC branch
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0(https://github.com/makubacki/edk2/tree/uncrustify_poc_5
>=C2=A0 =C2=A0 =C2=A0<https://github.co= m/makubacki/edk2/tree/uncrustify_poc_5>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0<https://github.com/makubacki/edk2/tree/uncrustify_poc_5
>=C2=A0 =C2=A0 =C2=A0<https://github.co= m/makubacki/edk2/tree/uncrustify_poc_5>>), I see the
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>> uncr= ustify.cfg configuration file in the root.
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>>
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0https:= //github.com/makubacki/edk2/blob/uncrustify_poc_5/uncrustify.cfg
>=C2=A0 =C2=A0 =C2=A0<ht= tps://github.com/makubacki/edk2/blob/uncrustify_poc_5/uncrustify.cfg>= ;
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0 =C2=A0<https://github.com/makubacki/edk2/blob/uncrustify_poc_5/uncrustify.cfg= <https://github.com/ma= kubacki/edk2/blob/uncrustify_poc_5/uncrustify.cfg>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>> Howe= ver, in your Wiki, you provide examples where this
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0configuration file is in a= n
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>> .unc= rustify directory
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>>
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0https://dev.azure.com/projectmu/Uncrustify/_wik= i/wikis/Uncrustify.wiki/1/Project-Mu-(EDK-II)-Fork-Readme
>=C2=A0 =C2=A0 =C2=A0<https://dev.azure.com/projectmu/Uncrustif= y/_wiki/wikis/Uncrustify.wiki/1/Project-Mu-(EDK-II)-Fork-Readme>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0 =C2=A0<https://dev.azure.com/projectmu/Uncr= ustify/_wiki/wikis/Uncrustify.wiki/1/Project-Mu-(EDK-II)-Fork-Readme &l= t;https://dev.azure.com/projectmu/Uncrustify/_wiki/wikis/Uncrustify.wik= i/1/Project-Mu-(EDK-II)-Fork-Readme>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>> The = uncrustify.cfg files also contains commented out
>=C2=A0 =C2=A0 =C2=A0settings
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0for the file header
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>> and = function header templates.
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>>=C2= =A0 =C2=A0 =C2=A0 =C2=A0 # cmt_insert_file_header=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =3D
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0default_file_header.txt >=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>>=C2= =A0 =C2=A0 =C2=A0 =C2=A0 # cmt_insert_func_header=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =3D
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0default_function_header.tx= t
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>> Are = these disabled on purpose?
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>> Do w= e want to enable them?=C2=A0 If so, should the uncrustify
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0configuration file
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>> and = the templates go into a .uncrustify directory?
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>> Than= ks,
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>> Mike=
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 >>>
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0 > --
>=C2=A0 =C2=A0 =C2=A0 > Pedro Falcato >
>
>
> --
> Pedro Falcato


--
Pedro Falcato
--00000000000041867805d0f23817--