public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Michael D Kinney" <michael.d.kinney@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"mikuback@linux.microsoft.com" <mikuback@linux.microsoft.com>,
	"brijesh.singh@amd.com" <brijesh.singh@amd.com>,
	"Kinney, Michael D" <michael.d.kinney@intel.com>
Subject: Re: [edk2-devel] EDK2 CI build error "Uncrustify Coding Standard"
Date: Tue, 7 Dec 2021 21:02:37 +0000	[thread overview]
Message-ID: <CO1PR11MB4929763742A7C6534737EFA7D26E9@CO1PR11MB4929.namprd11.prod.outlook.com> (raw)
In-Reply-To: <f7559589-5934-66b5-7534-19b9f745a1b8@linux.microsoft.com>

Hi Brijesh,

Yes.  Your branch can be rebased on top of edk2/master after uncrustify changes.

You have added new c/h files, so those files need to be run through uncrustify locally and 
your patch updated with those formatting changes.

The following command updates every c/h file except BaseTools locally.

    git ls-files *.c *.h :!BaseTools/* | .pytool\Plugin\UncrustifyCheck\mu-uncrustify-release_extdep\Windows-x86\uncrustify.exe -c .pytool\Plugin\UncrustifyCheck\uncrustify.cfg -F - --replace --no-backup --if-changed

If you know the package you are working on, the following one will work faster.

    git ls-files <PackageName>*.c <PackageName>*.h :!BaseTools/* | .pytool\Plugin\UncrustifyCheck\mu-uncrustify-release_extdep\Windows-x86\uncrustify.exe -c .pytool\Plugin\UncrustifyCheck\uncrustify.cfg -F - --replace --no-backup --if-changed

OvmfPkg Example:

    git ls-files OvmfPkg/*.c OvmfPkg/*.h :!BaseTools/* | .pytool\Plugin\UncrustifyCheck\mu-uncrustify-release_extdep\Windows-x86\uncrustify.exe -c .pytool\Plugin\UncrustifyCheck\uncrustify.cfg -F - --replace --no-backup --if-changed


You do have to use the .pytool stuart commands to setup your environment so uncrustify tool is installed automatically.
This also allows you to run all the EDK II CI tests locally if you want to check and fix issues before
submitting a PR.

    https://github.com/tianocore/edk2/blob/master/.pytool/Readme.md#running-ci-locally

You can also use git filter-branch to uncrustify a more complex patch series.  That is in the email thread
and will be included in the Wiki.

Best regards,

Mike

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Michael Kubacki
> Sent: Tuesday, December 7, 2021 12:50 PM
> To: devel@edk2.groups.io; brijesh.singh@amd.com
> Subject: Re: [edk2-devel] EDK2 CI build error "Uncrustify Coding Standard"
> 
> Hi Brijesh,
> 
> A Tianocore wiki article is being prepared but the background and
> instructions for what to do were sent in this mail regarding the hard
> freeze being lifted - https://edk2.groups.io/g/devel/message/84458.
> 
> Do you have questions after reading through that?
> 
> Thanks,
> Michael
> 
> On 12/7/2021 2:52 PM, Brijesh Singh via groups.io wrote:
> > Hi All,
> >
> > I am rebasing the SNP series and encountering the error like below from
> > the CI. I am not sure what I am missing. For testing purpose, I just
> > tried one commit and CI Windows build complains about this. This is the
> > same patch which passed all the CI. Any idea what I maybe missing ?
> >
> >
> > WARNING - A file header template is not specified in the config file.
> > WARNING - A function header template is not specified in the config file.
> > ERROR - /home/vsts/work/1/s/OvmfPkg/Sec/AmdSev.c
> > ERROR - /home/vsts/work/1/s/OvmfPkg/Sec/AmdSev.h
> > ERROR - --->Test Failed: Uncrustify Coding Standard Test NO-TARGET
> > returned 2
> >
> >
> > My patch does add the two files and they are listed in .inf.
> >
> > -Brijesh
> >
> >
> >
> >
> 
> 
> 
> 


  reply	other threads:[~2021-12-07 21:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-07 19:52 EDK2 CI build error "Uncrustify Coding Standard" Brijesh Singh
2021-12-07 20:49 ` [edk2-devel] " Michael Kubacki
2021-12-07 21:02   ` Michael D Kinney [this message]
2021-12-08 14:39     ` Brijesh Singh
2021-12-08 16:10       ` Brijesh Singh
2021-12-08 16:15         ` Michael Kubacki
2022-04-05  5:57           ` Ashish Kalra
2022-04-05  6:09             ` Ashish Kalra
2022-04-05 14:40               ` Michael Kubacki
2022-04-05 14:42                 ` Michael Kubacki
2022-04-05 15:00               ` Rebecca Cran
2022-04-05 15:21                 ` 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=CO1PR11MB4929763742A7C6534737EFA7D26E9@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