Thread (10 messages) 10 messages, 3 authors, 2020-11-12

[Linux-kernel-mentees] [PATCH] checkpatch: avoid COMMIT_LOG_LONG_LINE warning for signature tags

From: Aditya Srivastava <hidden>
Date: 2020-11-11 19:20:09
Subsystem: checkpatch, the rest · Maintainers: Andy Whitcroft, Joe Perches, Linus Torvalds

Currently checkpatch warns us for long lines in commits even for
signature tag lines.

E.g., running checkpatch on commit 4bbdfe25600c ("IB/opa_vnic: Properly
clear Mac Table Digest") reports this warning:

WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line)
Reviewed-by: Niranjana Vishwanathapura <redacted>

This is an example of false positive. Provide a fix by excluding
signature tag lines from this class of warning.

Signed-off-by: Aditya Srivastava <redacted>
---
 scripts/checkpatch.pl | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index ac7e5ac80b58..1d257b1f4a4f 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2963,6 +2963,8 @@ sub process {
 					# filename then :
 		      $line =~ /^\s*(?:Fixes:|Link:)/i ||
 					# A Fixes: or Link: line
+		      $line =~ /^\s*(?:$signature_tags)/ ||
+		      			# signature tag line
 		      $commit_log_possible_stack_dump)) {
 			WARN("COMMIT_LOG_LONG_LINE",
 			     "Possible unwrapped commit description (prefer a maximum 75 chars per line)\n" . $herecurr);
-- 
2.17.1

_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help