[PATCH v3 1/6] oe_mkimage: Use consistent indentation
Andrew Jeffery
andrew at aj.id.au
Wed Feb 24 11:36:10 AEDT 2016
On Tue, 2016-02-23 at 23:54 +0000, Milton Miller II wrote:
>
> About 02/23/2016 04:55PM in some time zone, Joel Stanley wrote:
> >On Wed, Feb 24, 2016 at 1:14 AM, Andrew Jeffery <andrew at aj.id.au>
> >wrote:
> >> It was inconsistent with the rest of the file, which seems to use 7
> >> spaces. In particular, vim-sleuth was detecting the indentation
> >style
> >> from the first indent(s) in the file, which were in the oe_mkimage
> >> function.
> >
> >7 spaces seems kind of unusual.
> >
> >Upstream bbclass files are a mixture; I'd go with 8 spaces as I
> >suspect that was the intent in this file.
> >
>
> Looks like yocto-poky/meta/classes/image_types_uboot.bbclass
> upon which this is based used 4 spaces for the function that
> was copied.
So according to the openembedded wiki[1]:
* Use spaces for indentation as developers tends to use different
amount of spaces per one tab.
* Shell functions in OE-Core usually use tabs for indentation
but
* other layers usually use consistent indentation with 4 spaces (in
shell functions, python functions and for indentation of multi-line
variables)
Maybe we just be consistently inconsistent as well? :P
[1] http://www.openembedded.org/wiki/Styleguide
Anyway, this was another instance where I was trying to avoid the
bikeshedding; I wanted my editor to work with me not against me and so
just made it consistent with the rest of the file.
Happy to bikeshed out an acceptable coding style. Can we make the change to whatever we come up with a separate patch?
>
> Going to 8 spaces puts one \ over 80 columns in do_generate_flash
> but its after a || so it can just be dropped and the shell will parse the
> next line implicitly.
>
> I don't care if we leave it at 7 for now or go to 8.
I don't think I've ever seen 7 spaces used for indentation anywhere
else. My preferences are either 4 or 8 spaces. Probably 4 given the
styleguide quote above, given we're layers, not OE-core.
Andrew
>
>
> >>
> >> Signed-off-by: Andrew Jeffery <andrew at aj.id.au>
> >> ---
> >> meta-phosphor/classes/obmc-phosphor-image_types_uboot.bbclass | 6
> >+++---
> >> 1 file changed, 3 insertions(+), 3 deletions(-)
> >
>
> milton
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20160224/bb9fb8b2/attachment.sig>
More information about the openbmc
mailing list