Checkpatch: Disable commit log length check warning for signature tag
PATCH v2 1/1 Checkpatch: Disable commit log length check warning for signature tag
Disable commit log length check in case of signature tag. If the commit log line has valid signature tags such as "Reported-and-tested-by" with more than 75 characters, suppress the long length warning.
For instance in commit ac854131d984 ("USB: core: Fix misleading driver bug report"), the corresponding patch contains a "Reported by" tag line which exceeds 75 chars. And there is no valid way to shorten the length.
--- scripts/checkpatch.pl | 2 ++ 1 file changed, 2 insertions(+)
scripts/checkpatch.pl +2 -0
@@ -2806,6 +2806,8 @@ sub process { # filename then : $line =~ /^\s*(?:Fixes:|Link:)/i || # A Fixes: or Link: line + $line =~ /$signature_tags/ || + # Check for signature_tags $commit_log_possible_stack_dump)) { WARN("COMMIT_LOG_LONG_LINE", "Possible unwrapped commit description (prefer a maximum 75 chars per line)\n" . $herecurr);
Signature · 6 lines
2.25.1 _______________________________________________ Linux-kernel-mentees mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
Quoted 9 lines · Nachiket Naganure
Disable commit log length check in case of signature tag. If the commit log line has valid signature tags such as "Reported-and-tested-by" with more than 75 characters, suppress the long length warning.
For instance in commit
ac854131d984("USB: core: Fix misleading driver bug report"), the corresponding patch contains a "Reported by" tag line which exceeds 75 chars. And there is no valid way to shorten the length.Signed-off-by Nachiket Naganure <[email protected]>
It looks more sound now. It applies cleanly on next-20200724, and it addresses the false positive in the mentioned commit.
The commit message header is still wrong.
If you run
git log --oneline ./scripts/checkpatch.pl
you will see that all commits start with lower-case "checkpatch:" and very often, it continues with lower-case after the colon.
Fix that and send it out to intended recipients using get_maintainers.pl, also CC the kernel-mentees list, Shuah and me.
Lukas
Quoted 21 lines
--- scripts/checkpatch.pl | 2 ++ 1 file changed, 2 insertions(+)scripts/checkpatch.pl +2
-0@@ -2806,6 +2806,8 @@ sub process { # filename then : $line =~ /^\s*(?:Fixes:|Link:)/i || # A Fixes: or Link: line + $line =~ /$signature_tags/ || + # Check for signature_tags $commit_log_possible_stack_dump)) { WARN("COMMIT_LOG_LONG_LINE", "Possible unwrapped commit description (prefer a maximum 75 chars per line)\n" . $herecurr);Signature · 1 line
2.25.1
_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees