From: Joe Perches <joe@perches.com>
To: "Niklas Söderlund" <niklas.soderlund@corigine.com>,
"Dwaipayan Ray" <dwaipayanray1@gmail.com>,
"Lukas Bulwahn" <lukas.bulwahn@gmail.com>,
"Jonathan Corbet" <corbet@lwn.net>,
"Andy Whitcroft" <apw@canonical.com>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
"Philippe Schenker" <philippe.schenker@toradex.com>,
"Stephen Rothwell" <sfr@canb.auug.org.au>
Cc: oss-drivers@corigine.com,
Simon Horman <simon.horman@corigine.com>,
Louis Peens <louis.peens@corigine.com>
Subject: Re: [PATCH v7] checkpatch: warn for non-standard fixes tag style
Date: Wed, 14 Sep 2022 09:09:25 -0700 [thread overview]
Message-ID: <aa858ac592679fdf512debe17e0612c575450860.camel@perches.com> (raw)
In-Reply-To: <20220914100255.1048460-1-niklas.soderlund@corigine.com>
On Wed, 2022-09-14 at 12:02 +0200, Niklas Söderlund wrote:
> Add a warning for fixes tags that does not follow community conventions.
[]
> * Changes since v6
> - Update first check to make sure that there is a likely SHA1 of some
> minimum length after the fixes line.
https://lore.kernel.org/lkml/2febb7893346b6234983453de7c037536e479bfc.camel@perches.com/
The goal here should be to identify a line that looks like a commit
reference.
So find lines that starts with 'fixes' and have a SHA1 commit id as
broadly as reasonable.
Did you run the grep pattern and look at the results?
One grep pattern to verify the non canonical fixes format that
are mistakenly used is:
$ git log --since=5-years-ago --no-merges --grep='^\s*fixes' -i --format=email -P | \
grep -P -i '^\s*fixes' | \
grep -P -v '^Fixes: [0-9a-f]{12,12}\s*\(".*")'
[]
There are many different styles.
Parenthesea are sometimes not used.
> + if ($line =~ /(\s*fixes:?)\s+([0-9a-f]{5,})\s+($balanced_parens)/i) {
How about some pattern like
/fixes\s*:?\s*(?:commit:?\s*)?[0-9a-f]{5,}/i
or maybe even more broadly:
/fixes\b.*\b[0-9a-f]{5,}\b/i
next prev parent reply other threads:[~2022-09-14 16:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-14 10:02 Niklas Söderlund
2022-09-14 16:09 ` Joe Perches [this message]
2022-09-15 9:14 ` Niklas Söderlund
2022-09-21 14:25 ` Niklas Söderlund
2022-09-21 16:56 ` Joe Perches
2022-09-21 16:57 ` Joe Perches
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=aa858ac592679fdf512debe17e0612c575450860.camel@perches.com \
--to=joe@perches.com \
--cc=apw@canonical.com \
--cc=corbet@lwn.net \
--cc=dwaipayanray1@gmail.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=louis.peens@corigine.com \
--cc=lukas.bulwahn@gmail.com \
--cc=niklas.soderlund@corigine.com \
--cc=oss-drivers@corigine.com \
--cc=philippe.schenker@toradex.com \
--cc=sfr@canb.auug.org.au \
--cc=simon.horman@corigine.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
all inboxes | Powered by JetHome®