[OE-core] Yocto style guide change proposal

Martin Jansa martin.jansa at gmail.com
Fri Jul 20 15:07:09 UTC 2012


On Fri, Jul 20, 2012 at 03:31:04PM +0100, Paul Eggleton wrote:
> On Friday 20 July 2012 07:15:28 Chris Larson wrote:
> > If you don't see two different types of indentation in one file as
> > inconsistent, I think you need to look up consistency in a dictionary.
> 
> You're not wrong - but that's not the point. Personally I'd really prefer we 
> had four spaces everywhere; I'm not entirely sure why we chose this convention 
> in the first place. However, it's the convention we have now and changing it 
> has serious implications - almost every recipe will have to be changed; 

It doesn't need to be changed now everywhere, recipe maintainers can
change it if they want e.g. when upgrading recipe (preferably in
separate commit). Tabs highlight will help with that..

> backporting changes to stable releases will be made more difficult; submitted 
> patches crossing the switch will be difficult to apply, history will be 
> polluted, etc.
> 
> Changing this is not a small undertaking.

meta-efl + meta-smartphone size is about 1/2 of oe-core (counting .bb +
.inc) and it took only about 1 hour to replace all tabs with 8 spaces 
(when it was used to indent e.g. SRC_URI) or 4 spaces (when it was used 
in shell functions).

In many cases I had to replace 8 spaces with 4 when those shell
functions were indented with spaces already or with tabs/spaces mix.

Yes it's only aesthetics, but that's what "style guide" usually does.

Cheers,

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20120720/565c253a/attachment-0002.sig>


More information about the Openembedded-core mailing list