Re: [PATCH v4 1/3] checkpatch: warn when unknown tags are used for links

From: Matthieu Baerts
Date: Mon Feb 27 2023 - 08:25:53 EST


Hello,

On 20/01/2023 13:35, Thorsten Leemhuis wrote:
> From: Kai Wasserbäch <kai@xxxxxxxxxxxxxxxxxxxxxx>
>
> Issue a warning when encountering URLs behind unknown tags, as Linus
> recently stated ```please stop making up random tags that make no sense.
> Just use "Link:"```[1]. That statement was triggered by an use of
> 'BugLink', but that's not the only tag people invented:
>
> $ git log -100000 --no-merges --format=email -P \
> --grep='^\w+:[ \t]*http' | grep -Poh '^\w+:[ \t]*http' | \
> sort | uniq -c | sort -rn | head -n 20
> 103958 Link: http
> 418 BugLink: http
> 372 Patchwork: http
> 280 Closes: http
> 224 Bug: http
> 123 References: http
> 84 Bugzilla: http
> 61 URL: http
> 42 v1: http
> 38 Datasheet: http
> 20 v2: http
> 9 Ref: http
> 9 Fixes: http
> 9 Buglink: http
> 8 v3: http
> 8 Reference: http
> 7 See: http
> 6 1: http
> 5 link: http
> 3 Link:http
>
> Some of these non-standard tags make it harder for external tools that
> rely on use of proper tags. One of those tools is the regression
> tracking bot 'regzbot', which looks out for "Link:" tags pointing to
> reports of tracked regressions.

I'm sorry for the late feedback but would it be possible to add an
exception for the "Closes" tag followed by a URL?

This tag is useful -- at least for us when maintaining the MPTCP subtree
-- to have tickets being automatically closed when a patch is accepted.
I don't think this "Closes" tag is a "random one that makes no sense"
but I agree it is not an "official" one described in the documentation.

On our side, we are using GitHub to manage issues but this also works
with GitLab and probably others. Other keywords are also accepted [1][2]
but I guess it is best to stick with one, especially when it is already
used according to the list provided above.

Would it then be OK to allow this "Closes" tag in checkpatch.pl and
mention it in the documentation (Submitting patches)?

Or should we switch to the "Link" tag instead (and re-do the tracking
manually)?

Cheers,
Matt

[1]
https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests
[2]
https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#default-closing-pattern
--
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net