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>,
	"marcin.juszkiewicz@linaro.org" <marcin.juszkiewicz@linaro.org>,
	"Michael Kubacki" <mikuback@linux.microsoft.com>
Cc: "Kinney, Michael D" <michael.d.kinney@intel.com>
Subject: Re: [edk2-devel] Maybe it is time to update code style?
Date: Mon, 25 Sep 2023 15:25:31 +0000	[thread overview]
Message-ID: <CO1PR11MB4929C72355D48C0F4DA8D512D2FCA@CO1PR11MB4929.namprd11.prod.outlook.com> (raw)
In-Reply-To: <f6cc1fc4-0198-4066-9992-294f1ae59e5c@linaro.org>

I think you may be using the wrong version of the uncrustify tool.

Is that log from a local run or EDK II CI?

https://github.com/tianocore/tianocore.github.io/wiki/EDK-II-Code-Formatting

https://github.com/tianocore/tianocore.github.io/wiki/EDK-II-Code-Formatting#installing-uncrustify

Mike

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Marcin
> Juszkiewicz
> Sent: Monday, September 25, 2023 2:03 AM
> To: devel <devel@edk2.groups.io>
> Subject: [edk2-devel] Maybe it is time to update code style?
> 
> I feel sick each time I have to edit EDK2 code.
> 
> All those INF, DEC, DSC, FDF, XYZ files are something I do not even
> try
> to understand, just got minimal knowledge what goes where by asking
> Leif
> (thanks a lot!) and observing build error messages.
> 
> I got used to UINTN and other weird variable types. No idea where from
> they came from (MS Windows?)
> 
> 
> But what sucks more is those 2 spaces used for indenting code. Took me
> a while to reming myself when I used such. It was in 90s, when I was
> Amiga programmer and all I had was 720x480px screen.
> 
> Last time I looked at calendar it was 2023 year. Maybe it is time to
> move
> to 4 spaces?
> 
> And can someone take a look at config of code obfuscator used for
> linting?
> It spits out amount of information showing that noone looked at
> updating it
> to current version:
> 
> $  uncrustify -c ../edk2/.pytool/Plugin/UncrustifyCheck/uncrustify.cfg
> Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c
> Option<UNUM>: at
> ../edk2/.pytool/Plugin/UncrustifyCheck/uncrustify.cfg:48: Expected
> unsigned number , for 'mod_full_brace_if_chain'; got 'false'
> ../edk2/.pytool/Plugin/UncrustifyCheck/uncrustify.cfg:79: unknown
> option 'indent_func_call_edk2_style'
> Option<NUM>: at
> ../edk2/.pytool/Plugin/UncrustifyCheck/uncrustify.cfg:212: Expected
> number , for 'indent_bool_paren'; got 'true'
> Option<NUM>: at
> ../edk2/.pytool/Plugin/UncrustifyCheck/uncrustify.cfg:224: Expected
> number , for 'indent_comma_paren'; got 'true'
> ../edk2/.pytool/Plugin/UncrustifyCheck/uncrustify.cfg:241: option
> 'indent_sing_line_comments' is deprecated; did you want to use
> 'indent_single_line_comments_before' instead?
> ../edk2/.pytool/Plugin/UncrustifyCheck/uncrustify.cfg:270: unknown
> option 'align_edk2_style'
> ../edk2/.pytool/Plugin/UncrustifyCheck/uncrustify.cfg:426: option
> 'nl_func_var_def_blk' is deprecated; it has been replaced by
> 'nl_var_def_blk_end_func_top'.
> You can also use 'nl_var_def_blk_end' for additional functionality
> ../edk2/.pytool/Plugin/UncrustifyCheck/uncrustify.cfg:447: option
> 'pp_space' is deprecated; it has been replaced by 'pp_space_after'.
> Output suffix: .uncrustify
> do_source_file(1524): Parsing:
> Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c as
> language C
> 
> $  uncrustify --version
> Uncrustify_d-0.76.0_f
> 
> 
> And yet it is a tool which contributors like me are supposed to use
> before
> sending any change upstream.
> 
> 
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109041): https://edk2.groups.io/g/devel/message/109041
Mute This Topic: https://groups.io/mt/101570674/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



  reply	other threads:[~2023-09-25 15:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-25  9:03 [edk2-devel] Maybe it is time to update code style? Marcin Juszkiewicz
2023-09-25 15:25 ` Michael D Kinney [this message]
2023-09-25 15:39 ` Andrew Fish via groups.io
2023-09-25 17:16 ` Rebecca Cran via groups.io
2023-09-25 18:03 ` Pedro Falcato
2023-09-25 19:22   ` Marcin Juszkiewicz

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=CO1PR11MB4929C72355D48C0F4DA8D512D2FCA@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