rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Patrick Miller <paddymills@proton.me>
Cc: a.hindborg@samsung.com, alex.gaynor@gmail.com,
	aliceryhl@google.com, apw@canonical.com, benno.lossin@proton.me,
	bjorn3_gh@protonmail.com, boqun.feng@gmail.com,
	dwaipayanray1@gmail.com, gary@garyguo.net, joe@perches.com,
	linux-kernel@vger.kernel.org, lukas.bulwahn@gmail.com,
	ojeda@kernel.org, rust-for-linux@vger.kernel.org,
	tmgross@umich.edu, wedsonaf@gmail.com
Subject: Re: [PATCH 2/2] checkpatch: warn on known non-plural rust doc headers
Date: Fri, 6 Sep 2024 19:56:55 +0200	[thread overview]
Message-ID: <2024090628-bankable-refusal-5f20@gregkh> (raw)
In-Reply-To: <SP3tXoSxg14Ga_W2X_E6G3HpeqZjRVwWUhlMCcUMgDvvJOageFJiaQ1OLnZ0mxKuyueW4z10jZZgGankXKf8ezLTTEbyo_pF7vTbjrt0pZU=@proton.me>

On Fri, Sep 06, 2024 at 05:29:28PM +0000, Patrick Miller wrote:
> 
> 
> 
> 
> 
> On Friday, September 6th, 2024 at 1:00 PM, Greg KH <gregkh@linuxfoundation.org> wrote:
> 
> > 
> 
> > 
> 
> > On Fri, Sep 06, 2024 at 04:45:49PM +0000, Patrick Miller wrote:
> > 
> 
> > > Adds a check for documentation in rust file. Warns if certain known
> > > documentation headers are not plural.
> > > 
> 
> > > Signed-off-by: Patrick Miller paddymills@proton.me
> > > Suggested-by: Miguel Ojeda ojeda@kernel.org
> > > Link: https://github.com/Rust-for-Linux/linux/issues/1110
> > > 
> 
> > > ---
> > > scripts/checkpatch.pl | 8 ++++++++
> > > 1 file changed, 8 insertions(+)
> > > 
> 
> > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> > > index 39032224d504..0e99d11eeb04 100755
> > > --- a/scripts/checkpatch.pl
> > > +++ b/scripts/checkpatch.pl
> > > @@ -3900,6 +3900,14 @@ sub process {
> > > "Avoid using '.L' prefixed local symbol names for denoting a range of code via 'SYM_*_START/END' annotations; see Documentation/core-api/asm-annotations.rst\n" . $herecurr);
> > > }
> > > 
> 
> > > +# check that document section headers are plural in rust files
> > > + if ( $realfile =~ /\.rs$/
> > > + && $rawline =~ /^\+\s*\/\/\/\s+#+\s+(Example|Invariant)\s*$/ )
> > > + {
> > > + WARN( "RUST_DOC_HEADER",
> > > + "Rust doc he
> > > aders should be plural\n" . $herecurr );
> > 
> 
> > 
> 
> > Something went wrong, your patch lost the tabs and it had a line wrap?
> My bad! Editor settings strikes again.
> 
> > 
> 
> > And why is Rust unique for plurals here? What if there really is only
> > one example?
> Per Miguel Ojeda (who suggested the issue): "We prefer plurals when writing code documentation sections: # Examples, # Invariants, # Guarantees and # Panics, so that it is consistent and so that one can add more examples without having to change the section name."
> > 
> 
> > thanks,
> > 
> 
> > greg k-h
> 
> I apologize, first time submitting. Do I submit a new email or add the fixed patch to this one?

As this one can't apply, you need to send a whole new one :)


thanks,

greg k-h

  reply	other threads:[~2024-09-06 17:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-06 16:45 [PATCH 2/2] checkpatch: warn on known non-plural rust doc headers Patrick Miller
2024-09-06 17:00 ` Greg KH
2024-09-06 17:29   ` Patrick Miller
2024-09-06 17:56     ` Greg KH [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-09-06 18:05 Patrick Miller
2024-09-07 10:53 ` Joe Perches
2024-09-07 11:57   ` Patrick Miller
2024-09-07 14:22     ` Patrick Miller
2024-09-07 15:33       ` Joe Perches
2024-09-09 16:24   ` Benno Lossin
2024-09-09 16:31 ` Benno Lossin
2024-09-09 16:38   ` Benno Lossin

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=2024090628-bankable-refusal-5f20@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=a.hindborg@samsung.com \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=apw@canonical.com \
    --cc=benno.lossin@proton.me \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=dwaipayanray1@gmail.com \
    --cc=gary@garyguo.net \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas.bulwahn@gmail.com \
    --cc=ojeda@kernel.org \
    --cc=paddymills@proton.me \
    --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).