[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7b69d1470704090845v2102113fv235c3c09dbadbd51@mail.gmail.com>
Date: Mon, 9 Apr 2007 10:45:49 -0500
From: "Scott Preece" <sepreece@...il.com>
To: "Roland Dreier" <rdreier@...co.com>
Cc: "David Brownell" <david-b@...bell.net>,
"Stefan Richter" <stefanr@...6.in-berlin.de>,
"Jan Engelhardt" <jengelh@...ux01.gwdg.de>,
"Randy Dunlap" <randy.dunlap@...cle.com>,
"Tony Lindgren" <tony@...mide.com>, linux-kernel@...r.kernel.org
Subject: Re: coding style for long conditions
On 4/6/07, Roland Dreier <rdreier@...co.com> wrote:
> [I can't believe I'm stepping into an indentation flamewar, but here goes...]
> that the line with "bar" on it is properly indented with one tab
> (since it is part of the if statement that is also indented one tab),
> and then four spaces are used to align the "bar" with the previous
> line. So only tabs are used for indentation, and the spaces after the
> tab are used for alignment, and the letter of the law is observed.
>
> If you have a git tree handy, you can do "git show 68380b58" and see
> that Linus himself wrote:
>
> if (get_wq_data(work) == cwq
> && work_pending(work)
> && !list_empty(&work->entry)) {
>
---
I'm happy to see Linus did it exactly the way I would have...
So, perhaps the rule in CodingStyle should be clarified to say that
indentation is used to show nesting depth and always expressed in TAB
characters, but additional spacing may be used following the
structural TABs to appropriately format continuation lines...
scott
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists