Re: Coding Style: indenting with tabs vs. spaces

From: J. Bruce Fields
Date: Mon Nov 12 2007 - 10:38:24 EST


On Mon, Nov 12, 2007 at 10:13:08AM +0200, Benny Halevy wrote:
> checkpatch allows to indent with any number of tabs and up to 7 spaces.
> This is consistent with Documentation/CodingStyle and therefore can be
> considered "correct". However, forcing everybody to the same tab expansion
> setup is too limiting, especially when working in several environments
> at the same time where some of them may not be the linux kernel.
>
> Using only spaces as DervishD suggested works around that using brute force
> by forcing the user to the author's preference which is legitimate but
> may not be the most productive way.
>
> I think that my proposal of using tabs as logical indents only (as Xav put it)
> and spaces for decorative alignment provides the best of both worlds.
> One can expand the tabs to any number of spaces as one likes and then
> the trailing spaces will work on any editor setup as long as you use
> fixed-width font. That's not considered "correct" as per checkpatch but
> works much better for me.

The tabs-for-indent, spaces-for-alignment policy been proposed before;
this:

http://marc.info/?t=119251728100004&r=1&w=2

was only on the git mailing list, but we could probably dig up similar
discussions on lkml with some more work.

Speaking as someone who doesn't care, but doesn't see it as a
particularly interesting discussion, either....

--b.
-
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/