From: Ingo Molnar <mingo@elte.hu>
To: Linus Torvalds <torvalds@linux-foundation.org>,
Andy Whitcroft <apw@canonical.com>
Cc: Roland McGrath <roland@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ptrace: checkpatch fixes
Date: Thu, 9 Apr 2009 05:04:40 +0200 [thread overview]
Message-ID: <20090409030440.GA9169@elte.hu> (raw)
In-Reply-To: <alpine.LFD.2.00.0904081007530.4583@localhost.localdomain>
* Linus Torvalds <torvalds@linux-foundation.org> wrote:
> Oh well. If I actually read perl, I could parse what the hell
> those 80-character rules are in checkpath. It already has random
> "it's ok if X" stuff. But it never seems to really have any "oh,
> but splitting is worse" logic.
We should perhaps introduce an too-deep-indentation warning: any
function with "[;{}]$" lines of 4 tabs in a row is already suspect
IMHO. At 5 it's definitely crazy and ugly.
This would be a very efficient function-length reductor: it cannot
be worked around via line wraps.
It would also be wonderful to warn about bad 80 columns 'fixes' -
i've seen way too many perfectly fine cleanups damaged by ugly
line-wrapping solutions.
We could also up the limit to 90 or 100 columns. My terminals are at
90 columns and that's still pretty ergonomic. 100 is too wide to me
personally. (i'd argue that lines longer than 100 fall outside the
brain's 'field of view' cache and are beyond a general complexity
threshold as well, so they are not efficient to read, regardless of
monitor size and quality.)
Ingo
next prev parent reply other threads:[~2009-04-09 3:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-08 6:21 [PATCH] ptrace: checkpatch fixes Roland McGrath
2009-04-08 7:26 ` Sergio Luis
2009-04-08 12:50 ` Roland McGrath
2009-04-08 20:49 ` Sergio Luis
2009-04-08 17:19 ` Linus Torvalds
2009-04-08 19:57 ` Christian Borntraeger
2009-04-08 20:44 ` Linus Torvalds
2009-04-09 3:04 ` Ingo Molnar [this message]
2009-04-09 8:46 ` Miles Bader
2009-04-09 15:00 ` Linus Torvalds
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090409030440.GA9169@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@linux-foundation.org \
--cc=apw@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=roland@redhat.com \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox