From: Matthieu Baerts <matthieu.baerts@tessares.net> To: "Jonathan Corbet" <corbet@lwn.net>, "Andy Whitcroft" <apw@canonical.com>, "Joe Perches" <joe@perches.com>, "Dwaipayan Ray" <dwaipayanray1@gmail.com>, "Lukas Bulwahn" <lukas.bulwahn@gmail.com>, "Kai Wasserbäch" <kai@dev.carbon-project.org>, "Thorsten Leemhuis" <linux@leemhuis.info>, "Andrew Morton" <akpm@linux-foundation.org>, "David Airlie" <airlied@gmail.com>, "Daniel Vetter" <daniel@ffwll.ch> Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, mptcp@lists.linux.dev, Matthieu Baerts <matthieu.baerts@tessares.net> Subject: [PATCH 2/2] checkpatch: allow Closes tags with links Date: Wed, 15 Mar 2023 18:44:57 +0100 [thread overview] Message-ID: <20230314-doc-checkpatch-closes-tag-v1-2-1b83072e9a9a@tessares.net> (raw) In-Reply-To: <20230314-doc-checkpatch-closes-tag-v1-0-1b83072e9a9a@tessares.net> As a follow-up of the previous patch modifying the documentation to allow using the "Closes:" tag, checkpatch.pl is updated accordingly. checkpatch.pl now mentions the "Closes:" tag between brackets to express the fact it should be used only if it makes sense. While at it, checkpatch.pl will not complain if the "Closes" tag is used with a "long" line, similar to what is done with the "Link" tag. Fixes: 76f381bb77a0 ("checkpatch: warn when unknown tags are used for links") Fixes: d7f1d71e5ef6 ("checkpatch: warn when Reported-by: is not followed by Link:") Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/373 Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> --- scripts/checkpatch.pl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index bd44d12965c9..d6376e0b68cc 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3158,14 +3158,14 @@ sub process { } } -# check if Reported-by: is followed by a Link: +# check if Reported-by: is followed by a Link: (or Closes:) tag if ($sign_off =~ /^reported(?:|-and-tested)-by:$/i) { if (!defined $lines[$linenr]) { WARN("BAD_REPORTED_BY_LINK", - "Reported-by: should be immediately followed by Link: to the report\n" . $herecurr . $rawlines[$linenr] . "\n"); - } elsif ($rawlines[$linenr] !~ m{^link:\s*https?://}i) { + "Reported-by: should be immediately followed by Link: (or Closes:) to the report\n" . $herecurr . $rawlines[$linenr] . "\n"); + } elsif ($rawlines[$linenr] !~ m{^(link|closes):\s*https?://}i) { WARN("BAD_REPORTED_BY_LINK", - "Reported-by: should be immediately followed by Link: with a URL to the report\n" . $herecurr . $rawlines[$linenr] . "\n"); + "Reported-by: should be immediately followed by Link: (or Closes:) with a URL to the report\n" . $herecurr . $rawlines[$linenr] . "\n"); } } } @@ -3250,8 +3250,8 @@ sub process { # file delta changes $line =~ /^\s*(?:[\w\.\-\+]*\/)++[\w\.\-\+]+:/ || # filename then : - $line =~ /^\s*(?:Fixes:|Link:|$signature_tags)/i || - # A Fixes: or Link: line or signature tag line + $line =~ /^\s*(?:Fixes:|Link:|Closes:|$signature_tags)/i || + # A Fixes:, Link:, Closes: or signature tag line $commit_log_possible_stack_dump)) { WARN("COMMIT_LOG_LONG_LINE", "Possible unwrapped commit description (prefer a maximum 75 chars per line)\n" . $herecurr); @@ -3266,13 +3266,13 @@ sub process { # Check for odd tags before a URI/URL if ($in_commit_log && - $line =~ /^\s*(\w+):\s*http/ && $1 ne 'Link') { + $line =~ /^\s*(\w+):\s*http/ && $1 ne 'Link' && $1 ne 'Closes') { if ($1 =~ /^v(?:ersion)?\d+/i) { WARN("COMMIT_LOG_VERSIONING", "Patch version information should be after the --- line\n" . $herecurr); } else { WARN("COMMIT_LOG_USE_LINK", - "Unknown link reference '$1:', use 'Link:' instead\n" . $herecurr); + "Unknown link reference '$1:', use 'Link:' (or 'Closes:') instead\n" . $herecurr); } } -- 2.39.2
WARNING: multiple messages have this Message-ID (diff)
From: Matthieu Baerts <matthieu.baerts@tessares.net> To: "Jonathan Corbet" <corbet@lwn.net>, "Andy Whitcroft" <apw@canonical.com>, "Joe Perches" <joe@perches.com>, "Dwaipayan Ray" <dwaipayanray1@gmail.com>, "Lukas Bulwahn" <lukas.bulwahn@gmail.com>, "Kai Wasserbäch" <kai@dev.carbon-project.org>, "Thorsten Leemhuis" <linux@leemhuis.info>, "Andrew Morton" <akpm@linux-foundation.org>, "David Airlie" <airlied@gmail.com>, "Daniel Vetter" <daniel@ffwll.ch> Cc: Matthieu Baerts <matthieu.baerts@tessares.net>, mptcp@lists.linux.dev, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-doc@vger.kernel.org Subject: [PATCH 2/2] checkpatch: allow Closes tags with links Date: Wed, 15 Mar 2023 18:44:57 +0100 [thread overview] Message-ID: <20230314-doc-checkpatch-closes-tag-v1-2-1b83072e9a9a@tessares.net> (raw) In-Reply-To: <20230314-doc-checkpatch-closes-tag-v1-0-1b83072e9a9a@tessares.net> As a follow-up of the previous patch modifying the documentation to allow using the "Closes:" tag, checkpatch.pl is updated accordingly. checkpatch.pl now mentions the "Closes:" tag between brackets to express the fact it should be used only if it makes sense. While at it, checkpatch.pl will not complain if the "Closes" tag is used with a "long" line, similar to what is done with the "Link" tag. Fixes: 76f381bb77a0 ("checkpatch: warn when unknown tags are used for links") Fixes: d7f1d71e5ef6 ("checkpatch: warn when Reported-by: is not followed by Link:") Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/373 Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> --- scripts/checkpatch.pl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index bd44d12965c9..d6376e0b68cc 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3158,14 +3158,14 @@ sub process { } } -# check if Reported-by: is followed by a Link: +# check if Reported-by: is followed by a Link: (or Closes:) tag if ($sign_off =~ /^reported(?:|-and-tested)-by:$/i) { if (!defined $lines[$linenr]) { WARN("BAD_REPORTED_BY_LINK", - "Reported-by: should be immediately followed by Link: to the report\n" . $herecurr . $rawlines[$linenr] . "\n"); - } elsif ($rawlines[$linenr] !~ m{^link:\s*https?://}i) { + "Reported-by: should be immediately followed by Link: (or Closes:) to the report\n" . $herecurr . $rawlines[$linenr] . "\n"); + } elsif ($rawlines[$linenr] !~ m{^(link|closes):\s*https?://}i) { WARN("BAD_REPORTED_BY_LINK", - "Reported-by: should be immediately followed by Link: with a URL to the report\n" . $herecurr . $rawlines[$linenr] . "\n"); + "Reported-by: should be immediately followed by Link: (or Closes:) with a URL to the report\n" . $herecurr . $rawlines[$linenr] . "\n"); } } } @@ -3250,8 +3250,8 @@ sub process { # file delta changes $line =~ /^\s*(?:[\w\.\-\+]*\/)++[\w\.\-\+]+:/ || # filename then : - $line =~ /^\s*(?:Fixes:|Link:|$signature_tags)/i || - # A Fixes: or Link: line or signature tag line + $line =~ /^\s*(?:Fixes:|Link:|Closes:|$signature_tags)/i || + # A Fixes:, Link:, Closes: or signature tag line $commit_log_possible_stack_dump)) { WARN("COMMIT_LOG_LONG_LINE", "Possible unwrapped commit description (prefer a maximum 75 chars per line)\n" . $herecurr); @@ -3266,13 +3266,13 @@ sub process { # Check for odd tags before a URI/URL if ($in_commit_log && - $line =~ /^\s*(\w+):\s*http/ && $1 ne 'Link') { + $line =~ /^\s*(\w+):\s*http/ && $1 ne 'Link' && $1 ne 'Closes') { if ($1 =~ /^v(?:ersion)?\d+/i) { WARN("COMMIT_LOG_VERSIONING", "Patch version information should be after the --- line\n" . $herecurr); } else { WARN("COMMIT_LOG_USE_LINK", - "Unknown link reference '$1:', use 'Link:' instead\n" . $herecurr); + "Unknown link reference '$1:', use 'Link:' (or 'Closes:') instead\n" . $herecurr); } } -- 2.39.2
next prev parent reply other threads:[~2023-03-15 17:45 UTC|newest] Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-03-15 17:44 [PATCH 0/2] docs & checkpatch: allow Closes tags with links Matthieu Baerts 2023-03-15 17:44 ` Matthieu Baerts 2023-03-15 17:44 ` [PATCH 1/2] docs: process: " Matthieu Baerts 2023-03-15 17:44 ` Matthieu Baerts 2023-03-15 18:12 ` Konstantin Ryabitsev 2023-03-15 18:12 ` Konstantin Ryabitsev 2023-03-15 18:29 ` Matthieu Baerts 2023-03-15 18:29 ` Matthieu Baerts 2023-03-15 18:19 ` Jonathan Corbet 2023-03-15 18:19 ` Jonathan Corbet 2023-03-15 18:28 ` Matthieu Baerts 2023-03-15 18:28 ` Matthieu Baerts 2023-03-15 19:12 ` Andrew Morton 2023-03-15 19:12 ` Andrew Morton 2023-03-17 8:00 ` Bagas Sanjaya 2023-03-17 8:00 ` Bagas Sanjaya 2023-03-20 9:07 ` Matthieu Baerts 2023-03-20 9:07 ` Matthieu Baerts 2023-03-15 17:44 ` Matthieu Baerts [this message] 2023-03-15 17:44 ` [PATCH 2/2] checkpatch: " Matthieu Baerts 2023-03-15 19:25 ` checkpatch: allow Closes tags with links: Tests Results MPTCP CI 2023-03-16 9:22 ` [PATCH 0/2] docs & checkpatch: allow Closes tags with links Thorsten Leemhuis 2023-03-16 9:22 ` Thorsten Leemhuis 2023-03-16 11:43 ` Matthieu Baerts 2023-03-16 11:43 ` Matthieu Baerts 2023-03-16 17:30 ` Linus Torvalds 2023-03-16 17:30 ` Linus Torvalds 2023-03-17 16:58 ` Daniel Vetter 2023-03-17 16:58 ` Daniel Vetter 2023-03-17 18:41 ` Matthieu Baerts 2023-03-17 18:41 ` Matthieu Baerts 2023-03-17 18:56 ` Konstantin Ryabitsev 2023-03-17 18:56 ` Konstantin Ryabitsev 2023-03-16 16:22 ` Konstantin Ryabitsev 2023-03-16 16:22 ` Konstantin Ryabitsev
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=20230314-doc-checkpatch-closes-tag-v1-2-1b83072e9a9a@tessares.net \ --to=matthieu.baerts@tessares.net \ --cc=airlied@gmail.com \ --cc=akpm@linux-foundation.org \ --cc=apw@canonical.com \ --cc=corbet@lwn.net \ --cc=daniel@ffwll.ch \ --cc=dri-devel@lists.freedesktop.org \ --cc=dwaipayanray1@gmail.com \ --cc=joe@perches.com \ --cc=kai@dev.carbon-project.org \ --cc=linux-doc@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux@leemhuis.info \ --cc=lukas.bulwahn@gmail.com \ --cc=mptcp@lists.linux.dev \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.