public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Evan Lloyd <Evan.Lloyd@arm.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
	Matteo Carlini <Matteo.Carlini@arm.com>,
	"eif.lindholm@linaro.org" <eif.lindholm@linaro.org>,
	nd <nd@arm.com>
Subject: Re: [PATCH v2 01/13] ArmPlatformPkg: Tidy Lcd code: Coding standard
Date: Wed, 3 Jan 2018 16:06:13 +0000	[thread overview]
Message-ID: <HE1PR08MB2684099B3DE6392E755629FE8B1E0@HE1PR08MB2684.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <CAKv+Gu8tvqxOpoM0-4dZgef37=o5MnpWzXKX+eL9MsGOy_LyAg@mail.gmail.com>

Hi Ard

> -----Original Message-----
> From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org]
> Sent: 02 January 2018 15:21
> To: Evan Lloyd <Evan.Lloyd@arm.com>
> Cc: edk2-devel@lists.01.org; Matteo Carlini <Matteo.Carlini@arm.com>;
> eif.lindholm@linaro.org; nd <nd@arm.com>
> Subject: Re: [PATCH v2 01/13] ArmPlatformPkg: Tidy Lcd code: Coding
> standard
> 
> On 2 January 2018 at 15:11, Evan Lloyd <Evan.Lloyd@arm.com> wrote:
> > Hi Ard.
> > One aim of these changes is to get those files we have to play with into a
> state where a beautifier like indent, astyle,  or clang-format can be used to
> help tidy our changes.  (NOTE, we do not have that fully working yet, but
> they do help.)  In a world where we have to play with several contradictory
> formatting standards (not just EDK2) then anything that can help is
> welcome.
> > Of the changes made:
> >         Fixing the include guards: is a small improvement.  (Ideally
> patchcheck should reject these.)
> >         Reducing lines to 80 columns: makes Leif (at least) happy, and aligns
> with formatter behaviour.
> >         Correcting Doxygen format comments: prevents Doxygen generating
> gibberish.
> >         Spaces before '(': Maintains consistency, and aligns with desired
> formatter behaviour.
> >
> 
> To be honest, this is an aspect I hadn't considered at all. It would be
> excellent if we could use tooling to fix our code wrt to coding style, and if
> changes such as these bring us closer to that goal, I am all for it.

 [[Evan Lloyd]] Excellent news - now you know why we were doing all those inexplicable things.  I really should have explained this more clearly before.

> 
> Would it be feasible to run that on entire packages, i.e., ArmPkg and
> ArmPlatformPkg?

 [[Evan Lloyd]]  As it stands, none of the tools is very happy with the EDK2 style, and they tend to miss meeting it in different ways.
(As an aside - one common problem is that I have found no means of coercing them to force the ");" at the end of a function call onto its own line.  Your recent CCS change to make that optional helps a lot with that.)  However, I have so far failed to get any of the above tools to do exactly what we want.  All that I can achieve is to generate a formatted view that can be compared against the original with a visual program like kdiff3 - highlighting some formatting improvements that can then be copied across, whilst the mismatches can be ignored.  This is not much, but it does help, especially with spacing and line length errors.

If you are interested, I am very happy to make those parameter files that I have available for consideration, as long as everyone understands how far from fully compliant they are, and that their limitations are manifold.  I suspect the path to a fully automated reformat will be a long and winding road.  The best bet might be to actually change one of the Open Source tools to suit us, but I certainly don't know of anyone with the leisure time available to take that on.

Regards,
Evan

> 
...
> >> > --
> >> > Guid("CE165669-3EF3-493F-B85D-6190EE5B9759")
> >> >

  parent reply	other threads:[~2018-01-03 16:01 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-22 18:34 [PATCH v2 00/13] ArmPlatformPkg: Update GOP evan.lloyd
2017-12-22 18:34 ` [PATCH v2 01/13] ArmPlatformPkg: Tidy Lcd code: Coding standard evan.lloyd
2017-12-23 13:19   ` Ard Biesheuvel
2018-01-02 15:11     ` Evan Lloyd
2018-01-02 15:21       ` Ard Biesheuvel
2018-01-02 15:21         ` Ard Biesheuvel
2018-01-03 16:06         ` Evan Lloyd [this message]
2017-12-22 18:34 ` [PATCH v2 02/13] ArmPlatformPkg: Tidy Lcd code: Updated comments evan.lloyd
2017-12-22 18:34 ` [PATCH v2 03/13] ArmPlatformPkg: PL111 and HDLCD: add const qualifier evan.lloyd
2017-12-23 13:21   ` Ard Biesheuvel
2017-12-22 18:34 ` [PATCH v2 04/13] ArmPlatformPkg: HDLCD and PL111: Update debug ASSERTS evan.lloyd
2017-12-23 13:22   ` Ard Biesheuvel
2017-12-22 18:34 ` [PATCH v2 05/13] ArmPlatformPkg: PL111Lcd: Replace magic number with macro evan.lloyd
2017-12-23 13:24   ` Ard Biesheuvel
2017-12-22 18:34 ` [PATCH v2 06/13] ArmPlatformPkg: Implement LcdIdentify function for HDLCD GOP evan.lloyd
2017-12-23 13:24   ` Ard Biesheuvel
2017-12-22 18:34 ` [PATCH v2 07/13] ArmPlatformPkg: Redefine LcdPlatformGetTimings function evan.lloyd
2017-12-23 13:27   ` Ard Biesheuvel
2017-12-22 18:34 ` [PATCH v2 08/13] ArmPlatformPkg: Add PCD to select pixel format evan.lloyd
2017-12-23 13:29   ` Ard Biesheuvel
2017-12-22 18:34 ` [PATCH v2 09/13] ArmPlatformPkg: PCD to swap red/blue format for HDLCD evan.lloyd
2017-12-23 13:34   ` Ard Biesheuvel
2017-12-22 18:34 ` [PATCH v2 10/13] ArmPlatformPkg: Additional display modes evan.lloyd
2017-12-23 13:35   ` Ard Biesheuvel
2017-12-22 18:34 ` [PATCH v2 11/13] ArmPlatformPkg: Reserving framebuffer at build evan.lloyd
2017-12-23 13:36   ` Ard Biesheuvel
2017-12-22 18:34 ` [PATCH v2 12/13] ArmPlatformPkg: New DP500/DP550/DP650 GOP driver evan.lloyd
2017-12-23 13:44   ` Ard Biesheuvel
2017-12-22 18:34 ` [PATCH v2 13/13] ArmPlatformPkg: Introduce SCMI protocol evan.lloyd
2017-12-23 14:05   ` Ard Biesheuvel

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=HE1PR08MB2684099B3DE6392E755629FE8B1E0@HE1PR08MB2684.eurprd08.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