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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



David Brownell wrote:
> On Friday 06 April 2007 12:03 pm, Stefan Richter wrote:
> 
>> I usually indent this way if expressions exceed the 80 columns limit:

Or in other words:
  - When a new scope is opened, increase indentations by 8 characters.
    Use a tab for that.
  - When wrapping within an expression, start the new line at the same
    column at which the (sub-)expression started.
  - Deviations from the latter rule allowed if it increases readability.

> Please change your coding style to conform to Documentation/CodingStyle.

I won't change this anymore in any legacy code I write patches for.  But
I also won't stand in the way of anybody who happens to submit patches
which strictly only...

> 	***	Only indent with tabs!!		***

...indent with tabs and change legacy code whose maintainer I am.

> Every one of those examples violates that simple rule.
> 
> Why does *anyone* have even the slightest difficulty understanding such a
> simple rule?

/Does/ anybody have difficulties?

...
>> PS:  Everyone please try to avoid blowing CodingStyle up to a 200 pages
>> document.  Thanks.
> 
> Better yet, try to stick to its guidelines rather than growing lots of
> exceptions saying when your personal style says you ought to use spaces
> instead of tabs for indents, etc

What I said at the top of this posting has not been newly grown recently
but has been common practice for many years.  It's not my personal style.

(Note, I'm not saying one style is better than the other, nor am I
saying that only one style can be allowed, nor am I saying that it's
fine to have several different styles.)
-- 
Stefan Richter
-=====-=-=== -=-- --==-
http://arcgraph.de/sr/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux