Re: coding style for long conditions (WAS: Re: [PATCH 25/90] ... blinky leds!!)

From: David Brownell
Date: Fri Apr 06 2007 - 17:19:55 EST


On Friday 06 April 2007 12:16 pm, Jan Engelhardt wrote:
> >> and that the inner block code
> >> (lines 3 and 4) should have more indent than line 2.
> >
> >We disagree. The "inner" block should in all cases have one-tab indent.
>
> You disagree. "We", as in, the kernel coders,

... agree with what I said, since that's exactly what CodingStyle says,
and what essentially every line of kernel code does today. (There are
random spots of brokenness, but they get fixed over time.)


> though I do not speak for
> them, seem to do it much the way I described, judging from the code they
> wrote/write.

Your eyes are broken then ... or maybe you're focussing exclusively
on code that violates the most basic coding guidelines like:

if (...) {
THAT WAS ONE MORE TAB
}

and

for (...) {
THAT WAS ALSO ONE MORE TAB
}

Come on, stop wasting everyone's time with utter nonsense.

- Indent always uses tabs
- When breaking long lines (including long conditions)
* STILL indent with tabs
* ... and more than one, to be "substantially" more indented

That's what Documentation/CodingStyle says **TODAY** so stop with the flamage.



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/