Re: [PATCH] checkpatch: add support to check 'Fixes:' tag format

From: Joe Perches
Date: Thu Apr 30 2020 - 11:41:23 EST


On Thu, 2020-04-30 at 20:56 +0800, Wang YanQing wrote:
> On Wed, Apr 29, 2020 at 07:40:21PM +0200, Markus Elfring wrote:
> > > â...
> > > Do not split the tag across multiple
> > > lines, tags are exempt from the "wrap at 75 columns" rule in order to simplify
> > > parsing scripts
> > > ...â
> >
> > Why do you not like the reformatting of the quotation so far
> > (if such change descriptions should cope also with specific
> > Unicode characters)?
> >
> > ââ
> > Do not split the tag across multiple lines, tags are exempt from
> > the "wrap at 75 columns" rule in order to simplify parsing scripts.
> > ââ
> >
> >
>
> Sigh. I will fix it, but I want to hear from Joe Perches before
> next patch version.

Hello YanQing.

Just ignore Markus' replies here, he's well meaning
but perhaps overly focused on trying to impose formal,
but somewhat antique grammar and word choice uses that
aren't particularly important for review.

The most common variant I see here is someone writes

Fixes: SHA1 ("Truncated commit description...")

to apparently avoid a long line.

btw:

you can test your patch using checkpatch and --git like:

$ git log -10000 --no-merges --grep="Fixes:" --format=%H | \
while read commit ; do \
./scripts/checkpatch.pl --git $commit --types=GIT_COMMIT_ID --quiet --nosummary; \
done

You could filter that either by modifying the patch
changing to "GIT_COMMIT_ID_TEST" and changing to
types=GIT_COMMIT_ID_TEST just for Fixes or maybe
use another grep like grep -B3 -A3 "Fixes:" -i