Re: [Gitorious] Activity: bamse207 created branch user-profil...

2 views
Skip to first unread message

Jim Garrison

unread,
Mar 31, 2012, 5:11:58 PM3/31/12
to ductus-d...@googlegroups.com
We should never mix tabs and spaces.
f1e019580231e2413475eff6e506c9ce3f2541e1 has some tabs in it. They are
evil. <http://google.com/search?q=tabs+are+evil>

Several other commits mix them too. I've been working on cleaning them
up in the ui-editor-cleanup branch, in particular.

The only place we should have tabs is when we have copied and pasted
code from another project and that project uses tabs. In this case, we
should use tabs only (and not mix spaces with them) when we modify that
code.

The file gui_jquery.js on the ui-editor-cleanup branch has a lot of
lines that mix tabs and spaces in bad ways.

I will update DuctusContributorGuide to mention all these things. I
should have done this much sooner.

Getting indentation correct the first time is a Good Thing because it
messes up the diff/blame history any time you change indentation.
(Indeed, this is actually the main reason I held out on doing the
re-indentation in c1bd6005255 for so long. :)

I will cherry-pick the existing commits in the user-profile branch and
fix them along the way. So only worry about this for future commits.

Cheers,
Jim

Laurent Savaete

unread,
Apr 2, 2012, 4:05:45 AM4/2/12
to ductus-d...@googlegroups.com
ok, that's a valid comment, though I'm supposed to be aware of all
this tabs are evil story :)
so there's something wrong with my vi settings, because vi's setup to
expand tabs to spaces.
(20 min later) ok, the problem was that I set vim to expand tabs in
.js files only, but didn't do that for .html files, so the tabs issue
is probably mostly in template files. Let me know if that is not what
you find.

2012/3/31 Jim Garrison <garr...@wikiotics.org>:


> We should never mix tabs and spaces.
> f1e019580231e2413475eff6e506c9ce3f2541e1 has some tabs in it.  They are
> evil.  <http://google.com/search?q=tabs+are+evil>

> The file gui_jquery.js on the ui-editor-cleanup branch has a lot of


> lines that mix tabs and spaces in bad ways.

gui-jquery was imported from wami, which is probably why it's full of
crap. That doesn't excuse my missing those errors, but that's where
they came from (most of them), I think.

> I will update DuctusContributorGuide to mention all these things.  I
> should have done this much sooner.
>
> Getting indentation correct the first time is a Good Thing because it
> messes up the diff/blame history any time you change indentation.
> (Indeed, this is actually the main reason I held out on doing the
> re-indentation in c1bd6005255 for so long. :)

yeah, i figured that out when I started merging code later on :)

> I will cherry-pick the existing commits in the user-profile branch and
> fix them along the way.  So only worry about this for future commits.

sorry there's so much mess in all those commits...

Reply all
Reply to author
Forward
0 new messages