[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aa858ac592679fdf512debe17e0612c575450860.camel@perches.com>
Date: Wed, 14 Sep 2022 09:09:25 -0700
From: Joe Perches <joe@...ches.com>
To: Niklas Söderlund
<niklas.soderlund@...igine.com>,
Dwaipayan Ray <dwaipayanray1@...il.com>,
Lukas Bulwahn <lukas.bulwahn@...il.com>,
Jonathan Corbet <corbet@....net>,
Andy Whitcroft <apw@...onical.com>, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org,
Philippe Schenker <philippe.schenker@...adex.com>,
Stephen Rothwell <sfr@...b.auug.org.au>
Cc: oss-drivers@...igine.com, Simon Horman <simon.horman@...igine.com>,
Louis Peens <louis.peens@...igine.com>
Subject: Re: [PATCH v7] checkpatch: warn for non-standard fixes tag style
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
Powered by blists - more mailing lists