public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Michael D Kinney" <michael.d.kinney@intel.com>
To: Michael Kubacki <mikuback@linux.microsoft.com>,
	Gerd Hoffmann <kraxel@redhat.com>,
	"Kinney, Michael D" <michael.d.kinney@intel.com>
Cc: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"Chang, Abner" <abner.chang@hpe.com>,
	"Wang, Jian J" <jian.j.wang@intel.com>,
	"Michael Kubacki" <michael.kubacki@microsoft.com>,
	"Andrew Fish (afish@apple.com)" <afish@apple.com>,
	Leif Lindholm <leif@nuviainc.com>
Subject: Re: [edk2-devel] Uncrustify Conversion Detailed Plan and Extended Hard Freeze Update #4
Date: Thu, 2 Dec 2021 17:33:03 +0000	[thread overview]
Message-ID: <CO1PR11MB49292B4AA396C6CAE5A29864D2699@CO1PR11MB4929.namprd11.prod.outlook.com> (raw)
In-Reply-To: <ea60bd22-00d1-fedf-9e8c-97d2f0219d13@linux.microsoft.com>

Michael,

Given that there are now 2 requests for this feature, I think it is a
good idea to add the feature.

Package YAML files are part of the review content, so we can make sure 
we all look at these YAML changes and provide feedback when this
uncrustify exclusion feature is applied in areas that do not make
sense.

One additional challenge with the exclusion feature is how developers
can run uncrustify locally to prepare their patch reviews.  They can
not run it on all c/h files in a package.  Now they have to know which
directories to exclude.  This applies to running uncrustify from command
line and usages such as Visual Studio Code plugin.  In order to make 
it easy for developers to always get the right format, you would need
a helper tool that can look at the YAML file to know if there are
areas that are excluded and exclude files from the uncrustify processing.
I am concerned that someone will miss the exclusion list in patch 
generation and review and the uncrustified versions will get checked 
in by accident at some point.  EDK II CI will not care because it will
skip the UncrustifyCheck on excluded files/dirs.

Thanks,

Mike

> -----Original Message-----
> From: Michael Kubacki <mikuback@linux.microsoft.com>
> Sent: Thursday, December 2, 2021 9:15 AM
> To: Gerd Hoffmann <kraxel@redhat.com>
> Cc: devel@edk2.groups.io; Kinney, Michael D <michael.d.kinney@intel.com>; Chang, Abner <abner.chang@hpe.com>; Wang, Jian J
> <jian.j.wang@intel.com>; Michael Kubacki <michael.kubacki@microsoft.com>; Andrew Fish (afish@apple.com) <afish@apple.com>;
> Leif Lindholm <leif@nuviainc.com>
> Subject: Re: [edk2-devel] Uncrustify Conversion Detailed Plan and Extended Hard Freeze Update #4
> 
> Thank you for clarifying. This case is more reasonable to me since the
> files are auto generated and not ported into edk2.
> 
> There is an option to bring files like this in as a new submodule but I
> understand why that might not be desirable and would be disruptive to
> the current process.
> 
> If there's no objection, I'll add an option to exclude paths within a
> package in a v6 patch of the plugin and leave this to maintainer
> discretion. I just ask that the spirit of consistent formatting be
> considered when making these decisions.
> 
> Regards,
> Michael
> 
> On 12/2/2021 11:23 AM, Gerd Hoffmann wrote:
> > On Thu, Dec 02, 2021 at 10:33:14AM -0500, Michael Kubacki wrote:
> >> Hi Gerd,
> >>
> >> To help me understand which files you're specifically referring to, can you
> >> please point them out from this commit? Or provide additional details?
> >>
> >> https://github.com/tianocore/edk2/pull/2229/commits/50654dfe5785964c9ae72961d13a50b26af77794
> >>
> >> CryptoPkg/Library/Include/openssl/opensslconf.h is currently formatted.
> >
> > Yes, that one, and there is another in CryptoPkg/Library/Include/crypto/
> > The switch to openssl 3.0 will add more of those files[1]
> >
> > They are generated from openssl source code,
> > CryptoPkg/Library/OpensslLib/process_files.pl handles that.
> >
> > I think the two reasonable options to deal with that are:
> >
> >    (1) exclude those files from formating, or
> >    (2) call uncrustify in process_files.pl to reformat them
> >        each time they are generated.
> >
> > Given that these files will never be edited manually my personal
> > preference would be (1).
> >
> > take care,
> >    Gerd
> >
> > [1] wip branch @ https://github.com/kraxel/edk2/commits/openssl3
> >

  reply	other threads:[~2021-12-02 17:33 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-30 22:34 Uncrustify Conversion Detailed Plan and Extended Hard Freeze Update #4 Michael D Kinney
2021-12-01  1:42 ` Wu, Hao A
2021-12-01  2:10 ` 回复: [edk2-devel] " gaoliming
2021-12-01  2:26 ` Ni, Ray
2021-12-01  2:45 ` Chiu, Chasel
2021-12-01  5:34 ` Wang, Jian J
2021-12-01  6:38 ` Wang, Jian J
2021-12-01  7:33   ` [edk2-devel] " Abner Chang
2021-12-01 16:43     ` Michael D Kinney
2021-12-01 17:05       ` Michael Kubacki
2021-12-01 17:39         ` Michael D Kinney
2021-12-02  5:48           ` Abner Chang
2021-12-02 11:00         ` Gerd Hoffmann
2021-12-02 15:33           ` Michael Kubacki
2021-12-02 16:23             ` Gerd Hoffmann
2021-12-02 17:15               ` Michael Kubacki
2021-12-02 17:33                 ` Michael D Kinney [this message]
2021-12-01 12:59 ` Sami Mujawar
2021-12-01 18:52 ` Bret Barkelew
2021-12-02 18:27 ` [edk2-devel] " Maciej Rabeda
2021-12-02 19:45   ` Michael D Kinney
2021-12-02 21:56     ` Michael Kubacki
2021-12-03  0:14       ` Michael D Kinney
2021-12-03  0:18         ` Michael D Kinney
2021-12-03  0:31           ` Michael Kubacki
2021-12-03  0:53             ` Michael D Kinney
2021-12-03  2:22               ` Michael D Kinney
2021-12-06  1:17                 ` Michael D Kinney
2021-12-06  1:23                   ` Wu, Hao A
2021-12-06  2:29                     ` Ni, Ray
2021-12-06  9:31                   ` 回复: " gaoliming
2021-12-06 19:45                   ` Bret Barkelew
2021-12-06 20:28                   ` Maciej Rabeda
2021-12-07  0:26                   ` Abner Chang
2021-12-07  3:47                   ` Wang, Jian J
2021-12-07  4:21                   ` Chiu, Chasel
2021-12-07 10:02                   ` Sami Mujawar
2021-12-03  8:56 ` Gerd Hoffmann
2021-12-03 16:25   ` Michael D Kinney

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-list 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=CO1PR11MB49292B4AA396C6CAE5A29864D2699@CO1PR11MB4929.namprd11.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox