From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Cc: qemu-devel@nongnu.org, "Alex Bennée" <alex.bennee@linaro.org>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Stefan Hajnoczi" <stefanha@redhat.com>
Subject: Re: [PATCH v1] scripts/checkpatch.pl: check for placeholders in cover letter patches
Date: Tue, 30 Jan 2024 09:47:05 +0000 [thread overview]
Message-ID: <ZbjFmQNrq3zVb5l6@redhat.com> (raw)
In-Reply-To: <CAAjaMXaxqEGDY3RwSPns-Rr67-RV-9CL35XkKMyEhrryYAqsfQ@mail.gmail.com>
On Tue, Jan 30, 2024 at 10:51:58AM +0200, Manos Pitsidianakis wrote:
> On Tue, 30 Jan 2024 at 10:12, Daniel P. Berrangé <berrange@redhat.com> wrote:
> >
> > On Tue, Jan 30, 2024 at 09:56:15AM +0200, Manos Pitsidianakis wrote:
> > > Check if a file argument is a cover letter patch produced by
> > > git-format-patch --cover-letter; It is initialized with subject suffix "
> > > *** SUBJECT HERE ***" and body prefix " *** BLURB HERE ***". If they
> > > exist, warn the user.
> > >
> > > Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
> > > ---
> > > scripts/checkpatch.pl | 14 ++++++++++++++
> > > 1 file changed, 14 insertions(+)
> > >
> > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> > > index 7026895074..34f12c9848 100755
> > > --- a/scripts/checkpatch.pl
> > > +++ b/scripts/checkpatch.pl
> > > @@ -1650,6 +1650,20 @@ sub process {
> > > $non_utf8_charset = 1;
> > > }
> > >
> > > +# Check if this is a cover letter patch produced by git-format-patch
> > > +# --cover-letter; It is initialized with subject suffix
> > > +# " *** SUBJECT HERE ***" and body prefix " *** BLURB HERE ***"
> > > + if ($in_header_lines &&
> > > + $rawline =~ /^Subject:.+[*]{3} SUBJECT HERE [*]{3}\s*$/) {
> > > + WARN("Patch appears to be a cover letter with uninitialized subject" .
> > > + " '*** SUBJECT HERE ***'\n$hereline\n");
> > > + }
> > > +
> > > + if ($rawline =~ /^[*]{3} BLURB HERE [*]{3}\s*$/) {
> > > + WARN("Patch appears to be a cover letter with leftover placeholder " .
> > > + "text '*** BLURB HERE ***'\n$hereline\n");
> > > + }
> >
> > Indentation here is totally off
>
> It only seems that way because the pre-existing lines use tabs, while
> I used spaces, according to the QEMU Coding style:
It is more important to be consistent within a single function.
Regardless of that though, the indent is still broken because the body
of the 'if' condition is indented /less/ than the 'if' condition itself.
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2024-01-30 9:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-30 7:56 [PATCH v1] scripts/checkpatch.pl: check for placeholders in cover letter patches Manos Pitsidianakis
2024-01-30 8:12 ` Daniel P. Berrangé
2024-01-30 8:51 ` Manos Pitsidianakis
2024-01-30 9:47 ` Daniel P. Berrangé [this message]
2024-01-30 9:54 ` Manos Pitsidianakis
2024-01-30 9:59 ` Daniel P. Berrangé
2024-01-30 10:17 ` Manos Pitsidianakis
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=ZbjFmQNrq3zVb5l6@redhat.com \
--to=berrange@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=manos.pitsidianakis@linaro.org \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.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).