Skip to contentSkip to conversation

Checkpatch: Disables commit length check/warning in commit log in case of valid signature tags

PATCH In review Nachiket Naganure 2 participants 4 messages Jul 19, 2020 – Jul 20, 2020 Checkpatch

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Checkpatch: Disables commit length check/warning in commit log in case of valid signature tags

From: NachiketUN <[email protected]>

---
 scripts/checkpatch.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/checkpatch.pl +1 -1
index 197436b20288..8db0f26601c5 100755
@@ -2799,7 +2799,7 @@ sub process {
 
 # Check for line lengths > 75 in commit log, warn once
 		if ($in_commit_log && !$commit_log_long_line &&
-		    length($line) > 75 &&
+		    length($line) > 75 && $line !~ /$signature_tags/ &&
 		    !($line =~ /^\s*[a-zA-Z0-9_\/\.]+\s+\|\s+\d+/ ||
 					# file delta changes
 		      $line =~ /^\s*(?:[\w\.\-]+\/)++[\w\.\-]+:/ ||
Signature · 6 lines
2.25.1

_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
#1 lore raw

Did you checkpatch this patch?

You need to provide a rationale. Use a full checkpatch.pl evaluation data for showing the difference before and after applying the patch.

Lukas

Quoted 21 lines · Nachiket Naganure

From: NachiketUN <[email protected]>

---
 scripts/checkpatch.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/checkpatch.pl +1 -2
index 197436b20288..8db0f26601c5 100755
@@ -2799,7 +2799,7 @@ sub process {
 
 # Check for line lengths > 75 in commit log, warn once
                if ($in_commit_log && !$commit_log_long_line &&
-                   length($line) > 75 &&
+                   length($line) > 75 && $line !~ /$signature_tags/ &&
                    !($line =~ /^\s*[a-zA-Z0-9_\/\.]+\s+\|\s+\d+/ ||
                                        # file delta changes
                      $line =~ /^\s*(?:[\w\.\-]+\/)++[\w\.\-]+:/ ||
--
Quoted 3 lines

2.25.1

_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

author
#2 lore raw

I did run checkpatch on the patch in the previous mail. Checkpatch.pl outputs warnings for commit description lines that exceed beyond 75 chars. Sometimes these lines might contain signature tags that cannot be
shortened. The patch checks if the line has any valid signature tags and disables
the warning in such a case.
I tested it on patches which contain long commit log lines such as Reported-and-tested-by:
[email protected]
in patch generated by commit ID ac854131d984.
It does not output commit warning for in such cases.

Quoted 23 lines · Lukas Bulwahn

Did you checkpatch this patch?

You need to provide a rationale. Use a full checkpatch.pl evaluation data for showing the difference before and after applying the patch.

Lukas

Quoted 13 lines · Nachiket Naganure

From: NachiketUN <[email protected]>

---
 scripts/checkpatch.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/checkpatch.pl +0 -0
index 197436b20288..8db0f26601c5 100755
@@ -2799,7 +2799,7 @@ sub process {
 
Quoted 11 lines
Quoted 11 lines
scripts/checkpatch.pl +1 -2
 # Check for line lengths > 75 in commit log, warn once
                if ($in_commit_log && !$commit_log_long_line &&
-                   length($line) > 75 &&
+                   length($line) > 75 && $line !~ /$signature_tags/ &&
                    !($line =~ /^\s*[a-zA-Z0-9_\/\.]+\s+\|\s+\d+/ ||
                                        # file delta changes
                      $line =~ /^\s*(?:[\w\.\-]+\/)++[\w\.\-]+:/ ||
--

2.25.1

_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

#3 lore raw
Quoted 8 lines · Nachiket N

I did run checkpatch on the patch in the previous mail. Checkpatch.pl outputs warnings for commit description lines that exceed beyond 75 chars. Sometimes these lines might contain signature tags that cannot be
shortened. The patch checks if the line has any valid signature tags and disables
the warning in such a case.
I tested it on patches which contain long commit log lines such as

Quoted 7 lines
Reported-and-tested-by syzbot+db339689b2101f6f6071@

syzkaller.appspotmail.com
in patch generated by commit ID ac854131d984. It does not output commit warning for in such cases.

Quoted 2 lines

Okay, this patch below is not ready for submission to the general mailing list.

Please read the kernel documentation on proper preparation of a patch submission.

Lukas

On Sun, Jul 19, 2020 at 11:07 PM Lukas Bulwahn <[email protected]>

Quoted 25 lines
Quoted 23 lines · wrote:

Did you checkpatch this patch?

You need to provide a rationale. Use a full checkpatch.pl evaluation data for showing the difference before and after applying the patch.

Lukas

Quoted 13 lines · Nachiket Naganure

From: NachiketUN <[email protected]>

---
 scripts/checkpatch.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/checkpatch.pl +0 -0
index 197436b20288..8db0f26601c5 100755
@@ -2799,7 +2799,7 @@ sub process {
 
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
scripts/checkpatch.pl +1 -2
 # Check for line lengths > 75 in commit log, warn once
                if ($in_commit_log && !$commit_log_long_line &&
-                   length($line) > 75 &&
+                   length($line) > 75 && $line !~ /$signature_tags/ &&
                    !($line =~ /^\s*[a-zA-Z0-9_\/\.]+\s+\|\s+\d+/ ||
                                        # file delta changes
                      $line =~ /^\s*(?:[\w\.\-]+\/)++[\w\.\-]+:/ ||
--

2.25.1

_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees