Openembedded Core Discussions
 help / color / mirror / Atom feed
From: "Peter A. Bigot" <pab@pabigot.com>
To: Joe MacDonald <Joe.MacDonald@windriver.com>
Cc: Patches and discussions about the oe-core layer
	<Openembedded-core@lists.openembedded.org>
Subject: Re: recipe whitespace style questions
Date: Mon, 19 Aug 2013 17:57:32 -0500	[thread overview]
Message-ID: <5212A2DC.2000601@pabigot.com> (raw)
In-Reply-To: <20130814143157.GB3894@windriver.com>

On 08/14/2013 09:31 AM, Joe MacDonald wrote:
> [Re: [OE-core] recipe whitespace style questions] On 13.08.14 (Wed 16:13) Martin Jansa wrote:
>
>> On Wed, Aug 14, 2013 at 08:51:40AM -0500, Peter A. Bigot wrote:
>>> SRC_URI = "file://skeleton \
>>>              file://skeleton_test.c \
>>>              file://COPYRIGHT \
>>> "
>>>
>>> which I'll call "none", and;
>>>
>>> SRC_URI = "file://skeleton \
>>>              file://skeleton_test.c \
>>>              file://COPYRIGHT"
>>>
>>> which I'll call "joined".
>>>
>>> Again, for consistency's sake it would be nice to have a
>>> recommendation.  I personally prefer "none", which matches the closing
>>> bracket style for functions.
>>>
>>> Next: I've also seen:
>>>
>>> SRC_URI = " \
>>>       file://skeleton \
>>>       file://skeleton_test.c \
>>>       file://COPYRIGHT \
>>> "
>> I prefer this one (especially for longer variables or entries) or "none",
>> because with "none" it's easier to see where multiline variable ends.
>>
>> Worst is IMHO "joined" because when appending one more line you have to
>> edit 2 lines to move '"' so the diff for review is longer and harder to
>> read than just one added line.
> +1

To close this out: that's three votes for the style named "none" or the 
one with separated lines.  No objections raised.

I'd thought the style guide was part of the Yocto documentation so I 
could prepare a patch to it, but it appears to only exist 
(independently) on the Yocto 
(https://wiki.yoctoproject.org/wiki/Recipe_%26_Patch_Style_Guide) and 
OpenEmbedded (http://www.openembedded.org/wiki/Styleguide) wiki sites.

In lieu of my applying for accounts on those sites and updating them 
I'll leave it that I think these additions would document the 
conclusions of this discussion, and are what I'll try to follow in my 
own Yocto-based recipe development:

* Multiple-line continuations should be indented to the level of the 
content following the introductory quote symbol on the first line.

* Alternatively, the first line of a multi-line value may be continued 
after the introductory quote symbol, with all subsequent content lines 
indented four spaces (or one tab if within a shell function)

* Any closing quote of a multiple-line continuation should be placed at 
the indentation level of the first continued line.

Peter


      parent reply	other threads:[~2013-08-19 22:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-14 13:51 recipe whitespace style questions Peter A. Bigot
2013-08-14 14:13 ` Martin Jansa
2013-08-14 14:15   ` Chris Larson
     [not found]   ` <20130814143157.GB3894@windriver.com>
2013-08-19 22:57     ` Peter A. Bigot [this message]

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-all 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=5212A2DC.2000601@pabigot.com \
    --to=pab@pabigot.com \
    --cc=Joe.MacDonald@windriver.com \
    --cc=Openembedded-core@lists.openembedded.org \
    /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