Gentoo Archives: gentoo-dev

From: George Shapovalov <george@g.o>
To: gentoo-dev@g.o
Subject: Re: [gentoo-dev] Some 'proper coding' notes for ebuilds
Date: Sun, 03 Aug 2003 20:27:32
Message-Id: 200308031327.26379.george@gentoo.org
In Reply to: Re: [gentoo-dev] Some 'proper coding' notes for ebuilds by Stuart Herbert
1 Well, looks like there is no one around who remembers this thing, so I guess
2 I'll chime in:
3
4 This (tabbed indentation) is indeed a policy. The resuidual indications of
5 that can be found if you run lintool on some ebuild - it will complain about
6 spaces before or after the line, tabs are ok (and are supposed to be used for
7 indentation). While not really used nowadays, lintool is still a usefull
8 tool, albeit unmaintained :(. Repoman still does not have long-promised
9 ebuild integrity checks (not all of them at least), therefore I would still
10 recommend running lintool on new submissions and such (you just have to learn
11 its (few) misreported features).
12
13 There has been a discussion of this issue, I believe over a year ago already.
14 It has been decided that this indeed is a serious issue, worth being brought
15 into the policy (main reason I beleive was to settle the never-ending
16 debates). everybody agreed that it should be either all spaces or all tabs (I
17 hope nobody would want it otherwise nowadays?)
18 Upon weighting arguments thrown by bioth groups we have settled on all tabs.
19 IIRC the deciding reason was that with tabs everyone is free to use their own
20 level of indentation, while with spaces you are pretty much stuck with what
21 particular developer used. Therefore we would have to enforce that particular
22 aspect as well. Oh, should I mention that I am on a tabbed side ;)?
23
24 And on this account:
25 >Because, in any non-trivial piece of code, indents can end up being a mixture
26 >of tabs and spaces, rather than just tabs. When this happens, and you use a
27 This is against a policy and is strictly forbidden. All ebuilds in the tree
28 should only use tabs!
29
30 >different tab size to the author, the indented code suddenly becomes a tad
31 >unreadable.
32 Above makes this a non-issue, and as I described in the beginning we do have
33 that enforceent and we put it in place upon discussing alternatives and on
34 purpose.
35
36 George
37
38 On Sunday 03 August 2003 11:53, Stuart Herbert wrote:
39 > Sorry, but your arguments aren't convincing me yet that
40 >
41 > a) This belongs in the coding standards at all, and
42 > b) That tabs are the way to do this
43 >
44 > I guess I'm just a cantankerous old bugger, as we say over here ;-)
45
46
47
48 --
49 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] Some 'proper coding' notes for ebuilds Stuart Herbert <stuart@g.o>