[PATCH] checkpatch: Don't count URLs for "line too long"

From: Kees Cook
Date: Mon Sep 26 2022 - 22:15:27 EST


URLs (not in a Link: field) should be ignored for "line too long"
warnings. Allow any line containing "https://"; or "http://";.

Cc: Andy Whitcroft <apw@xxxxxxxxxxxxx>
Cc: Joe Perches <joe@xxxxxxxxxxx>
Cc: Dwaipayan Ray <dwaipayanray1@xxxxxxxxx>
Cc: Lukas Bulwahn <lukas.bulwahn@xxxxxxxxx>
Signed-off-by: Kees Cook <keescook@xxxxxxxxxxxx>
---
scripts/checkpatch.pl | 2 ++
1 file changed, 2 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 79e759aac543..d4dec90673b7 100755
--- 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)) {
--
2.34.1