From: Joe Perches <joe@perches.com>
To: Josh Triplett <josh@joshtriplett.org>
Cc: Andy Whitcroft <apw@canonical.com>,
gregkh@linux-foundation.org, akpm@linux-foundation.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scripts/checkpatch.pl: Only emit LONG_LINE for --strict
Date: Wed, 25 Jun 2014 21:16:51 -0700 [thread overview]
Message-ID: <1403756211.7977.22.camel@joe-AO725> (raw)
In-Reply-To: <20140626034430.GA22836@thin>
On Wed, 2014-06-25 at 20:44 -0700, Josh Triplett wrote:
> On Wed, Jun 25, 2014 at 07:33:03PM -0700, Joe Perches wrote:
> > On Wed, 2014-06-25 at 19:24 -0700, Josh Triplett wrote:
> > > On Wed, Jun 25, 2014 at 05:05:07PM -0700, Joe Perches wrote:
> > > > On Wed, 2014-06-25 at 08:46 -0700, Josh Triplett wrote:
> > > > > Regardless of the long-standing debate over line width, checkpatch
> > > > > should not warn about it by default.
> > > >
> > > > I'm not getting involved here.
> > > > I don't care much one way or another.
> > []
> > > I'm not asking you to get involved in the Great Line Length Debate;
> > > that's why I didn't attempt to patch CodingStyle or similar. However, I
> > > think it makes sense for *checkpatch* to stop emitting this warning.
> >
> > I think checkpatch should encourage people to write code in
> > a style that matches CodingStyle as well as the predominant
> > styles used in the rest of the kernel.
>
> Not arguing with that, but in this particular case the warning seems
> counterproductive to that goal, especially compared to the
> DEEP_INDENTATION warning. More subjective or "to taste" issues tend
> to have lower severity in checkpatch. And CodingStyle *already* says
> "unless exceeding 80 columns significantly increases
> readability"
Just some suggestions off the top of my head.
If the goal is to reduce long line lengths, then maybe
more warnings or --strict tests for things like:
long variable names: (pick a length)
some_long_variable_name_with_a_color
consecutive dereferences where a temporary might be better:
foo->bar[baz].member1 = 1;
foo->bar[baz].member2 = 2;
Multiple logical tests on a single line:
foo > bar && baz < quz && etc...
Arguments after column 80
1
1 2 3 4 5 6 7 8 9 0
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
result = some_long_function(some_arg(arg1, arg2), another_arg(arg3, arg4), 4);
where a single argument of a short length before a
statement terminating ; may be ignored, but a longer
argument list may not.
Long trigraphs:
should be on multiple lines
Comments beyond 80 column
No idea what's right.
etc...
next prev parent reply other threads:[~2014-06-26 4:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-25 15:46 Josh Triplett
2014-06-26 0:05 ` Joe Perches
2014-06-26 2:24 ` Josh Triplett
2014-06-26 2:33 ` Joe Perches
2014-06-26 3:44 ` Josh Triplett
2014-06-26 4:16 ` Joe Perches [this message]
2014-06-26 5:08 ` Josh Triplett
2014-06-26 5:29 ` Joe Perches
2014-06-26 5:49 ` Josh Triplett
2014-06-26 3:59 ` Greg KH
2014-06-26 4:43 ` Josh Triplett
2014-06-26 6:52 ` Christoph Hellwig
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=1403756211.7977.22.camel@joe-AO725 \
--to=joe@perches.com \
--cc=akpm@linux-foundation.org \
--cc=apw@canonical.com \
--cc=gregkh@linux-foundation.org \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®