* [PATCH] checkpatch: Avoid warnings for numbered references with URL
@ 2023-09-02 15:50 Anton Leontiev
2023-09-02 20:42 ` Joe Perches
0 siblings, 1 reply; 2+ messages in thread
From: Anton Leontiev @ 2023-09-02 15:50 UTC (permalink / raw)
To: linux-kernel; +Cc: Andy Whitcroft, Joe Perches, Dwaipayan Ray, Lukas Bulwahn
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.
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);
--
2.41.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] checkpatch: Avoid warnings for numbered references with URL
2023-09-02 15:50 [PATCH] checkpatch: Avoid warnings for numbered references with URL Anton Leontiev
@ 2023-09-02 20:42 ` Joe Perches
0 siblings, 0 replies; 2+ messages in thread
From: Joe Perches @ 2023-09-02 20:42 UTC (permalink / raw)
To: Anton Leontiev, linux-kernel; +Cc: Andy Whitcroft, Dwaipayan Ray, Lukas Bulwahn
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);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-09-02 20:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-02 15:50 [PATCH] checkpatch: Avoid warnings for numbered references with URL Anton Leontiev
2023-09-02 20:42 ` Joe Perches
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®