lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7277a646-a38d-4d61-a5c5-fc71e3e8cf72@pengutronix.de>
Date: Mon, 14 Apr 2025 09:39:46 +0200
From: Ahmad Fatoum <a.fatoum@...gutronix.de>
To: Andy Whitcroft <apw@...onical.com>, Joe Perches <joe@...ches.com>,
 Dwaipayan Ray <dwaipayanray1@...il.com>,
 Lukas Bulwahn <lukas.bulwahn@...il.com>
Cc: linux-kernel@...r.kernel.org, kernel@...gutronix.de
Subject: Re: [PATCH] checkpatch: don't warn about long lines with footnote
 links

Dear checkpatch.pl maintainers,

On 13.01.25 23:21, Ahmad Fatoum wrote:
> checkpatch will warn[0] about lines like the first footnote below,
> but breaking into multiple lines is not an option if the footnote
> is just a URL.
> 
> While there's already an exception for Link: tags and some commit
> messages add a footnote after it[1], the result is more noisy and harder
> to follow when mixed with non-URL footnotes, so explicit support for
> footnotes-prefixed URLs makes sense.
> 
> [0]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/checkpatch.pl#n3289
> [1]: Commit 6612ac8c625c ("lib/list_sort: clarify comparison function
>      requirements in list_sort()")

Any thoughts on this patch?

Thanks,
Ahmad

> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@...gutronix.de>
> ---
>  scripts/checkpatch.pl | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 7b28ad3317427a6bf9e27b77065aa3915cb13053..febc05c381856361120c02b9b52694cc6fa95302 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -642,6 +642,8 @@ foreach my $entry (@link_tags) {
>  }
>  $link_tags_search = "(?:${link_tags_search})";
>  
> +our $link_footnote = "(?:\\[\\d\\]: https?://)";
> +
>  our $tracing_logging_tags = qr{(?xi:
>  	[=-]*> |
>  	<[=-]* |
> @@ -3272,8 +3274,8 @@ sub process {
>  					# file delta changes
>  		      $line =~ /^\s*(?:[\w\.\-\+]*\/)++[\w\.\-\+]+:/ ||
>  					# filename then :
> -		      $line =~ /^\s*(?:Fixes:|$link_tags_search|$signature_tags)/i ||
> -					# A Fixes:, link or signature tag line
> +		      $line =~ /^\s*(?:Fixes:|$link_tags_search|$signature_tags|$link_footnote)/i ||
> +					# A Fixes:, link, footnote or signature tag line
>  		      $commit_log_possible_stack_dump)) {
>  			WARN("COMMIT_LOG_LONG_LINE",
>  			     "Prefer a maximum 75 chars per line (possible unwrapped commit description?)\n" . $herecurr);
> 
> ---
> base-commit: 37136bf5c3a6f6b686d74f41837a6406bec6b7bc
> change-id: 20250113-footnote-links-acbd4d0e5439
> 
> Best regards,


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ