qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	qemu-devel@nongnu.org, Eduardo Habkost <ehabkost@redhat.com>,
	Andreas Faerber <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH 2/4] CODING_STYLE, checkpatch: update line length rules
Date: Mon, 7 Sep 2015 19:02:55 +0200	[thread overview]
Message-ID: <55EDC33F.8030305@redhat.com> (raw)
In-Reply-To: <87lhci5k3q.fsf@blackfin.pond.sub.org>

On 07/09/15 17:23, Markus Armbruster wrote:
> Thomas Huth <thuth@redhat.com> writes:
> 
>> On 07/09/15 16:22, Paolo Bonzini wrote:
>> [...]
>>> Some other interesting data:
>>>
>>> - However, only 605 files have 5 or more lines with 77+ columns, so the
>>> odds of warnings after copy-n-paste are pretty slim.
>>
>> Apart from copy-n-pasting, there is also the problem that you can run
>> "checkpatch.pl -f" on a whole file ... it would also be ugly to suddenly
>> have (much) more warnings here.
> 
> Feature.  If you run checkpatch on a whole file, you obviously do it to
> find its ugly spots.  Lines longer than 76 characters qualify.

I sometimes also use "checkpatch.pl -f" to check my own new code that
I've added to files (when I did not create patch files yet). When it
suddenly spams me because of such new line-length warnings, that would
be quite annoying, I think.

>>> Based on the above data, I suggest having 79 columns as the limit (with
>>> the "BSD exception" unfortunately).  This still makes it possible to
>>> watch diffs on an 80-column terminal without wrapping.
>>
>> 79 sounds at least better to me than 76. So if you really want to change
>> the limit, please go for 79 instead of 76.
> 
> Have you read the thread leading up to this patch?

You mean the v1 thread of this patch? I slightly recall it ... and just
looked it up again. As far as I can see, you were the only one who
suggested such a small limit, John wanted to keep it at 80 columns and
Andreas suggested 78.

I can see your point with "typographic style suggests 60 characters",
but I think you can not really fully apply this to source code - it
reads much different that natural text, e.g. there are much more
separating special characters like parentheses and commas in between.

We could maybe mention that 76 columns limit in the coding style
document, to make people aware that they should start thinking about
breaking lines in two when they reach 76 characters in a line. But
changing checkpatch.pl to use this limit really sounds too harsh to me.
Maybe 79, yes, since that really gives to the possibility to nicely view
patches in a 80 columns terminal, too. (But if you try to view a 2-way
patch in a 80-columns window, you quite masochistic anyway, so I don't
see the point in reducing it to 78). Less than 79 would IMHO cause too
much noise with the already existing code, so I really would appreciate
if checkpatch.pl would not use less than that.

 Thomas

  parent reply	other threads:[~2015-09-07 17:03 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-07  9:53 [Qemu-devel] [PATCH 0/4] updates to coding style and checkpatch Paolo Bonzini
2015-09-07  9:53 ` [Qemu-devel] [PATCH 1/4] CODING_STYLE: update mixed declaration rules Paolo Bonzini
2015-09-09  9:20   ` Stefan Hajnoczi
2015-09-09 10:43   ` Alex Bennée
2015-09-07  9:53 ` [Qemu-devel] [PATCH 2/4] CODING_STYLE, checkpatch: update line length rules Paolo Bonzini
2015-09-07 13:18   ` Thomas Huth
2015-09-07 14:22     ` Paolo Bonzini
2015-09-07 14:37       ` Thomas Huth
2015-09-07 15:23         ` Markus Armbruster
2015-09-07 16:06           ` Paolo Bonzini
2015-09-07 17:05             ` Markus Armbruster
2015-09-09 16:26               ` John Snow
2015-09-09 17:22               ` Peter Maydell
2015-09-09 19:23                 ` Eduardo Habkost
2015-09-09 20:28                 ` Paolo Bonzini
2015-09-09 19:09             ` Eduardo Habkost
2015-09-07 17:02           ` Thomas Huth [this message]
2015-09-09 18:45             ` Eduardo Habkost
2015-09-07 15:17   ` Markus Armbruster
2015-09-07 15:54     ` Paolo Bonzini
2015-09-07 16:59       ` Markus Armbruster
2015-09-07  9:53 ` [Qemu-devel] [PATCH 3/4] checkpatch: adapt some tests to QEMU Paolo Bonzini
2015-09-09  9:22   ` Stefan Hajnoczi
2015-09-17 14:24   ` Peter Maydell
2015-09-17 16:00     ` Paolo Bonzini
2015-09-17 16:16       ` Peter Maydell
2015-09-17 16:32         ` Paolo Bonzini
2015-09-17 16:44           ` Eric Blake
2015-09-18  6:53             ` Markus Armbruster
2015-10-04 18:44           ` Peter Maydell
2015-10-05 18:11             ` Eduardo Habkost
2015-10-05 18:47               ` Peter Maydell
2015-10-05 19:27                 ` Paolo Bonzini
2015-09-07  9:53 ` [Qemu-devel] [PATCH 4/4] checkpatch: remove tests that are not relevant outside the kernel Paolo Bonzini

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=55EDC33F.8030305@redhat.com \
    --to=thuth@redhat.com \
    --cc=afaerber@suse.de \
    --cc=armbru@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).