lkml.org 
[lkml]   [2022]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] checkpatch: Don't count URLs for "line too long"
On Mon, Sep 26, 2022 at 10:40:50PM -0700, Joe Perches wrote:
> On Mon, 2022-09-26 at 19:15 -0700, Kees Cook wrote:
> > URLs (not in a Link: field) should be ignored for "line too long"
> > warnings. Allow any line containing "https://" or "http://".
>
> More generally, this should be for any URI
>
> > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> []
> > @@ -3175,6 +3175,8 @@ sub process {
> > # file delta changes
> > $line =~ /^\s*(?:[\w\.\-\+]*\/)++[\w\.\-\+]+:/ ||
> > # filename then :
> > + $line =~ /https?:\/\// ||
> > + # URLs
> > $line =~ /^\s*(?:Fixes:|Link:|$signature_tags)/i ||
> > # A Fixes: or Link: line or signature tag line
> > $commit_log_possible_stack_dump)) {
>
> And I don't recollect why this wasn't applied, but I think it's a rather better,
> more complete, patch:
>
> https://lore.kernel.org/lkml/20210114073513.15773-2-yashsri421@gmail.com/
>
> I believe I did ack it and forward it to Andrew Morton, but I don't
> see it on a lore list.

Many patches have internal references in the commit log (that aren't
appropriate for "Link:") like:

[1] https://some.domain/path/

It seems more flexible to just ignore lines with "http" in it...

-Kees

--
Kees Cook

\
 
 \ /
  Last update: 2022-09-27 16:09    [W:0.058 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site