mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Anton Leontiev <aleontiev@elvees.com>, linux-kernel@vger.kernel.org
Cc: Andy Whitcroft <apw@canonical.com>,
	Dwaipayan Ray <dwaipayanray1@gmail.com>,
	Lukas Bulwahn <lukas.bulwahn@gmail.com>
Subject: Re: [PATCH] checkpatch: Avoid warnings for numbered references with URL
Date: Sat, 02 Sep 2023 13:42:49 -0700	[thread overview]
Message-ID: <65819b768e01a78c976eaa895c67d9227fe5d3a0.camel@perches.com> (raw)
In-Reply-To: <20230902155006.1561074-1-aleontiev@elvees.com>

On Sat, 2023-09-02 at 18:50 +0300, Anton Leontiev wrote:
> Numbered references is one of the most frequently used ways to link
> external resources and them often exeed 75 chars. Add exception for
> these lines.

Conceptually ok, but there are other non-numbered uses of lists like

	o	link1
	o	link2
		...

or
	1:	link1
	2:	link2
		...

So maybe this should just allow any long line with a uri/url

> 
> Signed-off-by: Anton Leontiev <aleontiev@elvees.com>
> ---
>  scripts/checkpatch.pl | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 7d16f863edf1..929574f43d4d 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -3270,6 +3270,8 @@ sub process {
>  					# filename then :
>  		      $line =~ /^\s*(?:Fixes:|$link_tags_search|$signature_tags)/i ||
>  					# A Fixes:, link or signature tag line
> +		      $line =~ /^\s*\[\d+\]\s+[a-z][\w\.\+\-]*:\/\/\S+/i ||
> +					# reference with URL
>  		      $commit_log_possible_stack_dump)) {
>  			WARN("COMMIT_LOG_LONG_LINE",
>  			     "Prefer a maximum 75 chars per line (possible unwrapped commit description?)\n" . $herecurr);


      reply	other threads:[~2023-09-02 20:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-02 15:50 Anton Leontiev
2023-09-02 20:42 ` Joe Perches [this message]

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=65819b768e01a78c976eaa895c67d9227fe5d3a0.camel@perches.com \
    --to=joe@perches.com \
    --cc=aleontiev@elvees.com \
    --cc=apw@canonical.com \
    --cc=dwaipayanray1@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas.bulwahn@gmail.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®