From: "Brijesh Singh" <brijesh.singh@amd.com>
To: "Kinney, Michael D" <michael.d.kinney@intel.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>,
"mikuback@linux.microsoft.com" <mikuback@linux.microsoft.com>
Cc: brijesh.singh@amd.com
Subject: Re: [edk2-devel] EDK2 CI build error "Uncrustify Coding Standard"
Date: Wed, 8 Dec 2021 08:39:20 -0600 [thread overview]
Message-ID: <8bb9a4b2-2e04-62df-f688-9b6357091d21@amd.com> (raw)
In-Reply-To: <CO1PR11MB4929763742A7C6534737EFA7D26E9@CO1PR11MB4929.namprd11.prod.outlook.com>
Hi Mike,
On 12/7/21 3:02 PM, Kinney, Michael D wrote:
> 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
>
>
Thanks for the detail, I just did a pull and now I see the uncrustify
cfg files. I followed your above command on my Ubuntu desktop and
getting the below unknown symbol, is this a known issue ?
brijesh@sbrijesh-desktop:~/workdir/snp-edk2$ git ls-files
OvmfPkg/Sec/AmdSev.c | uncrustify -c
.pytool/Plugin/UncrustifyCheck/uncrustify.cfg -F - --replace --no-backup
--if-changed
.pytool/Plugin/UncrustifyCheck/uncrustify.cfg:73: unknown symbol
'nl_func_call_args_multi_line_ignore_closures'
.pytool/Plugin/UncrustifyCheck/uncrustify.cfg:79: unknown symbol
'indent_func_call_edk2_style'
.pytool/Plugin/UncrustifyCheck/uncrustify.cfg:120: unknown symbol
'sp_do_brace_open'
.pytool/Plugin/UncrustifyCheck/uncrustify.cfg:134: unknown symbol
'sp_before_vardef_square'
.pytool/Plugin/UncrustifyCheck/uncrustify.cfg:178: unknown symbol
'sp_brace_close_while'
.pytool/Plugin/UncrustifyCheck/uncrustify.cfg:184: unknown symbol
'sp_before_square_asm_block'
.pytool/Plugin/UncrustifyCheck/uncrustify.cfg:205: unknown symbol
'sp_while_paren_open'
.pytool/Plugin/UncrustifyCheck/uncrustify.cfg:229: unknown symbol
'indent_func_def_param_paren_pos_threshold'
.pytool/Plugin/UncrustifyCheck/uncrustify.cfg:270: unknown symbol
'align_edk2_style'
.pytool/Plugin/UncrustifyCheck/uncrustify.cfg:323: unknown symbol
'cmt_align_doxygen_javadoc_tags'
.pytool/Plugin/UncrustifyCheck/uncrustify.cfg:406: unknown symbol
'nl_before_whole_file_ifdef'
Parsing: OvmfPkg/Sec/AmdSev.c as language C
brijesh@sbrijesh-desktop:~/workdir/snp-edk2$
brijesh@sbrijesh-desktop:~/workdir/snp-edk2$ uncrustify --version
Uncrustify-0.69.0_f
I did submitted PR after above uncurstify run but the CI still didn't
like it. Do we need to have specific version of uncrustify ?
-Brijesh
> 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://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Fblob%2Fmaster%2F.pytool%2FReadme.md%23running-ci-locally&data=04%7C01%7Cbrijesh.singh%40amd.com%7Cb303a189de3446c5c52108d9b9c4e760%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637745077634999978%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=OnGmCqMIEwmrZmn48M6MwErLyB60ORfN7CUceS%2BhPmI%3D&reserved=0
>
> 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://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fedk2.groups.io%2Fg%2Fdevel%2Fmessage%2F84458&data=04%7C01%7Cbrijesh.singh%40amd.com%7Cb303a189de3446c5c52108d9b9c4e760%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637745077635009974%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=LRtAPIFef6zlz6x0YNqpM9Hn5WIjFP1C0moMZFO9TWA%3D&reserved=0.
>>
>> 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
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>
next prev parent reply other threads:[~2021-12-08 14:39 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
2021-12-08 14:39 ` Brijesh Singh [this message]
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=8bb9a4b2-2e04-62df-f688-9b6357091d21@amd.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