lkml.org 
[lkml]   [2022]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] feat: checkpatch: Warn about Reported-by: not being followed by a Link:
Date
Suggested-by: Thorsten Leemhuis <linux@leemhuis.info>
Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
---
scripts/checkpatch.pl | 14 ++++++++++++++
1 file changed, 14 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index a6d2ccaa3e..d957e9fddf 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3144,6 +3144,20 @@ sub process {
"Co-developed-by and Signed-off-by: name/email do not match \n" . "$here\n" . $rawline . "\n" .$rawlines[$linenr]);
}
}
+
+# check if Reported-by: is followed by a Link:
+ if ($sign_off =~ /^reported-by:$/i) {
+ if (!defined $lines[$linenr]) {
+ WARN("BAD_REPORTED_BY_LINK",
+ "Reported-by: must be immediately followed by Link:\n" . "$here\n" . $rawline);
+ } elsif ($rawlines[$linenr] !~ /^\s*link:\s*(.*)/i) {
+ WARN("BAD_REPORTED_BY_LINK",
+ "Reported-by: must be immediately followed by Link:\n" . "$here\n" . $rawline . "\n" .$rawlines[$linenr]);
+ } elsif ($lines[$linenr] !~ /https?:\/\//i) {
+ WARN("BAD_REPORTED_BY_LINK",
+ "Link: following Reported-by: should contain an URL\n" . "$here\n" . $rawline . "\n" .$rawlines[$linenr]);
+ }
+ }
}

# Check Fixes: styles is correct
--
2.35.1
\
 
 \ /
  Last update: 2022-12-04 12:39    [W:0.166 / U:0.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site