qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Markus Armbruster <armbru@redhat.com>
Cc: "Daniel P. Berrange" <berrange@redhat.com>,
	zhanghailiang <zhang.zhanghailiang@huawei.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"QEMU Trivial" <qemu-trivial@nongnu.org>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Gan Qixin" <ganqixin@huawei.com>,
	"Chenqun (kuhn)" <kuhn.chenqun@huawei.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: Re: [PATCH] scripts/checkpatch.pl: Modify the line length limit of the code
Date: Fri, 6 Nov 2020 16:19:31 +0000	[thread overview]
Message-ID: <CAFEAcA-3a8gYRPzk4jzv3QfLAw3tL74LoFTMy+VhXZA3QdOfPg@mail.gmail.com> (raw)
In-Reply-To: <87zh3ufoy4.fsf@dusky.pond.sub.org>

On Fri, 6 Nov 2020 at 16:08, Markus Armbruster <armbru@redhat.com> wrote:
> Peter Maydell <peter.maydell@linaro.org> writes:
> > Personally I just don't think checkpatch should be nudging people
> > into folding 85-character lines, especially when there are
> > multiple very similar lines in a row and only one would get
> > folded, eg the prototypes in target/arm/helper.h -- some of
> > these just edge beyond 80 characters and I think wrapping them
> > is clearly worse for readability.
>
> The warning's intent is "are you sure this line is better not broken?"
> The problem is people treating it as an order that absolves them from
> using good judgement instead.
>
> I propose to fix it by phrasing the warning more clearly.  Instead of
>
>     WARNING: line over 80 characters
>
> we could say
>
>     WARNING: line over 80 characters
>     Please examine the line, and use your judgement to decide whether
>     it should be broken.

I would suggest that for a line over 80 characters and less than
85 characters, the answer is going to be "better not broken"
a pretty high percentage of the time; that is, the warning
has too many false positives, and we should tune it to have fewer.

And the lure of "produce no warnings" is a strong one, so
we should be at least cautious about what our tooling is
nudging us into doing.

thanks
-- PMM


  reply	other threads:[~2020-11-06 16:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-05 15:42 [PATCH] scripts/checkpatch.pl: Modify the line length limit of the code Gan Qixin
2020-11-06 11:06 ` Peter Maydell
2020-11-06 13:07   ` Markus Armbruster
2020-11-06 13:39     ` Peter Maydell
2020-11-06 14:08       ` Philippe Mathieu-Daudé
2020-11-06 14:16         ` Peter Maydell
2020-11-06 14:49           ` Philippe Mathieu-Daudé
2020-11-06 16:08           ` Markus Armbruster
2020-11-06 16:19             ` Peter Maydell [this message]
2020-11-09  5:53               ` ganqixin
2020-11-09  9:01               ` Markus Armbruster
2020-11-30 13:26                 ` Peter Maydell
2020-12-02  9:19                   ` Markus Armbruster

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=CAFEAcA-3a8gYRPzk4jzv3QfLAw3tL74LoFTMy+VhXZA3QdOfPg@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=ganqixin@huawei.com \
    --cc=kuhn.chenqun@huawei.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=zhang.zhanghailiang@huawei.com \
    /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).