On Thursday 05 April 2007 1:35 pm, Jan Engelhardt wrote:
Yes. Where "indent" is measured -- always!! -- in tabs.
Documentation/Coding style is quite explicit on that point:
Outside of comments, documentation and except in Kconfig,
spaces are never used for indentation ...
Note also:
Statements longer than 80 columns will be broken into sensible
chunks. Descendants are always substantially shorter than the
parent and are placed substantially to the right. The same applies
to function headers with a long argument list. Long strings are
as well broken into shorter strings.
So not just "more" indent, but "substantially more". (Although one
could quibble, this is "expression" not "statement". Don't quibble.)
> and that the inner block code
We disagree. The "inner" block should in all cases have one-tab indent.
And CodingStyle says that line 2 should have "substantially more" indent...
Think of it this way: when the condition becomes so complex that it
no longer fits on one line, that block should never be re-indented.
Only the condition needs to be reworked to fit into 80 columns.
The entire point of "substantially more" is to stand out from the normal
"indent by one tab" rule" ... so that it's not mistaken for anything
except a line-wrap reformat.
> Using
No, that's a clear violation of CodingStyle on two separate points:
(a) the "always use tabs" rule, (b) the "substantially more" rule.
Note also that the notion of using spaces is for indents is clearly
described there as "heresy" .. your fu needs review if not overhaul.
- Dave
-
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Andi Kleen | [PATCH x86] [0/16] Various i386/x86-64 changes |
| Vladislav Bolkhovitin | Re: Integration of SCST in the mainstream Linux kernel |
| Pavel Roskin | ndiswrapper and GPL-only symbols redux |
git: | |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Natalie Protasevich | [BUG] New Kernel Bugs |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Arjan van de Ven | Re: [GIT]: Networking |
