From: Benno Lossin <benno.lossin@proton.me>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: "Charalampos Mitrodimas" <charmitro@posteo.net>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
"Danilo Krummrich" <dakr@kernel.org>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"Nathan Chancellor" <nathan@kernel.org>,
"Nick Desaulniers" <ndesaulniers@google.com>,
"Bill Wendling" <morbo@google.com>,
"Justin Stitt" <justinstitt@google.com>,
"Wedson Almeida Filho" <wedsonaf@gmail.com>,
rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev
Subject: Re: [PATCH] rust: fix clippy::too-long-first-doc-paragraph
Date: Sun, 16 Feb 2025 13:30:21 +0000 [thread overview]
Message-ID: <10c0a50e-14de-4da3-a592-dc65753cec1b@proton.me> (raw)
In-Reply-To: <CANiq72myMWv87Me2C6Nmse-p=4YL=J+ZTEHe2hu7AhbpfZhgyw@mail.gmail.com>
On 16.02.25 13:40, Miguel Ojeda wrote:
> On Sun, Feb 16, 2025 at 1:18 PM Benno Lossin <benno.lossin@proton.me> wrote:
>>
>> I have done some more digging and bisected my Rust version. It turns out
>> I was on a rather old nightly from last September. I also don't get the
>> error on a newer compiler version. My bisection identified that the
>> error last occurs in nightly 2024-10-18, so from 2024-10-19 onwards it
>> compiles without the error.
>
> Thanks Benno, that is very useful and saved me some work.
My pleasure :)
>> So probably `-Wclippy::all` implied the `too_long_first_doc_paragraph`
>> lint in that version. That is probably because of [1]. It changes the
>> lint from style to nursery.
>>
>> [1]: https://github.com/rust-lang/rust-clippy/pull/13551
>
> Yeah, sometimes that happens when working regularly with nightly over time.
>
> There is an upside, trying to look at it positively, which is that it
> gives us something to look into from time to time (i.e. the new lint)
> and give feedback, and sometimes we can clean it up anyway, even if
> the lint is broken and we cannot enable it just yet :)
Yeah that is true.
>> So we don't need this patch, as it seems this never hit stable. However,
>> there is already a patch fixing what this lint reports: 2f390cc58943
>> ("rust: provide proper code documentation titles").
>>
>> I think it's a good lint, so maybe we should turn it on?
>
> Agreed, we should -- it is something we tell people from time to time
> to fix in review, so hopefully it will make patches better before the
> review phase.
>
> ...well, assuming it works well enough, given it was moved to nursery,
> e.g. in the linked Zulip thread in your link above they point to
> https://github.com/rust-lang/rust-clippy/issues/13315 and
I don't think that this one is bad. Of course it would be nice if only
the rendered form would be considered, but there might also be people
reading it directly in the code, so it could actually be a good idea to
also keep the raw text short.
In the case of long links, one can easily work around it by just not
using an inline link. (so having [text with link] and then after the
paragraph `[text with link]: link`.)
> https://github.com/rust-lang/rust-clippy/issues/13538, which we may or
> may not care about.
This one just seems like a nice-to-have, but not a deal breaker.
IMO we can enable the lint (since the instance fixed in this patch is
the only error I get with that lint) and just see how it behaves.
---
Cheers,
Benno
next prev parent reply other threads:[~2025-02-16 13:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-15 22:31 [PATCH] rust: fix clippy::too-long-first-doc-paragraph Benno Lossin
2025-02-16 0:12 ` Charalampos Mitrodimas
2025-02-16 12:17 ` Benno Lossin
2025-02-16 12:40 ` Miguel Ojeda
2025-02-16 13:30 ` Benno Lossin [this message]
2025-02-16 17:22 ` Miguel Ojeda
2025-02-16 12:40 ` Charalampos Mitrodimas
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=10c0a50e-14de-4da3-a592-dc65753cec1b@proton.me \
--to=benno.lossin@proton.me \
--cc=a.hindborg@kernel.org \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=charmitro@posteo.net \
--cc=dakr@kernel.org \
--cc=gary@garyguo.net \
--cc=gregkh@linuxfoundation.org \
--cc=justinstitt@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=ojeda@kernel.org \
--cc=rafael@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tmgross@umich.edu \
--cc=wedsonaf@gmail.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).