On Thu, Jul 19, 2012 at 01:18:12PM +0200, Martin Jansa wrote:
> On Thu, Jul 19, 2012 at 11:15:48AM +0100, Richard Purdie wrote:
> > On Thu, 2012-07-19 at 11:49 +0200, Martin Jansa wrote:
> > > On Wed, Jul 18, 2012 at 12:40:18PM +0100, Richard Purdie wrote:
> > > > On Wed, 2012-07-18 at 11:17 +0100, Burton, Ross wrote:
> > > > > On 18 July 2012 11:06, Richard Purdie
> > > > > <[email protected]> wrote:
> > > > > > I put a proposal to the TSC, that we have bitbake warn/error 
> > > > > > whenever it
> > > > > > finds tab characters in any python function. The advantage of this 
> > > > > > is
> > > > > > that we give the user a clear definitive error. The downside is that
> > > > > > we'll have to go through all the metadata and scrub it for the 
> > > > > > problem.
> > > > > 
> > > > > Have you ran that warning over oe-core to check that there are not any
> > > > > legitimate uses of \t, not for indentation but inside strings?  I
> > > > > can't think of any realistic use but you never know (construct a
> > > > > Makefile in a python function?).
> > > > 
> > > > The check is for actual tab characters, not "\t". There are some
> > > > legitimate users of tab characters which I've replaced with \t in
> > > > strings.
> > > > 
> > > > My current patch work in progress for the conversion is:
> > > > 
> > > > http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=rpurdie/t14&id=49d3d01f3d61a0eb19b6852229fa8fc26712f653
> > > 
> > > from those 2 patches which were just merged I see that you're converting
> > > strictly python functions, can we extend this tabs->spaces rule also to
> > > bash tasks like do_install etc?
> > 
> > Shell tasks should be tabs according to the style guide. Its harder to
> > check the indentation in those and if the indentation is wrong, it
> > doesn't matter since they're not whitespace sensitive.
> > 
> > So whilst I'd welcome fixing them up, I don't think they need bitbake
> > enforcing policy in the same way as python functions.
> 
> Agreed about not forcing the check or updating all .bb/.inc files with
> this now, but maybe style guide should be updated now?
> 
> I really don't like files with mixed indentation (even when it doesn't
> hurt) especially with a lot of files not conforming to style guide now,
> using even mix of tabs/spaces on the same line..
> 
> FWIW: I've prepared patch for whole meta-smartphone to unify that and
> I've sent RFC for few bbclasses in meta-oe too.

I know you've sent me link do different style guide last time I've
asked, but first google hit (for openembedded style guide):
http://www.openembedded.org/wiki/Styleguide

says about tabs only this:
- Use spaces for indentation as developers tends to use different amount
  of spaces per one tab.

So only in yocto wiki there are 2 more bullets after that
https://wiki.yoctoproject.org/wiki/Recipe_%26_Patch_Style_Guide
- Use spaces for indentation as developers tends to use different amount
  of spaces per one tab.
- Shell functions should use tabs
- Python functions should use spaces (4 spaces per indent).

And yocto style guide is not in first 5 pages of result when searching
for "openembedded style guide".

Cheers,
-- 
Martin 'JaMa' Jansa     jabber: [email protected]

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Reply via email to