[edk2-devel] EDK2 CI build error "Uncrustify Coding Standard"

Brijesh Singh via groups.io brijesh.singh=amd.com at groups.io
Wed Dec 8 16:10:06 UTC 2021



On 12/8/21 8:39 AM, Brijesh Singh wrote:
...

>> 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 at 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 at sbrijesh-desktop:~/workdir/snp-edk2$
> brijesh at 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 ?
> 

Reading through the "Add Uncrustify formatting overview" email it seems 
we need to use a edk2 forked  version of uncrustify [1]. With this now I 
dont get any error.

[1] 
https://dev.azure.com/projectmu/Uncrustify/_packaging?_a=package&feed=mu_uncrustify&package=mu-uncrustify-release&version=73.0.3&protocolType=NuGet



thanks


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






More information about the edk2-devel-archive mailing list