linux-kernel-mentees.lists.linuxfoundation.org archive mirror
 help / color / mirror / Atom feed
* [Linux-kernel-mentees] [PATCH] Checkpatch: Disables commit length check/warning in commit log in case of valid signature tags
@ 2020-07-19 17:15 Nachiket Naganure
  2020-07-19 17:36 ` Lukas Bulwahn
  0 siblings, 1 reply; 4+ messages in thread
From: Nachiket Naganure @ 2020-07-19 17:15 UTC (permalink / raw)
  To: lukas.bulwahn, skhan; +Cc: NachiketUN, linux-kernel-mentees

From: NachiketUN <nachiketun8@gmail.com>

Signed-off-by: NachiketUN <nachiketun8@gmail.com>
---
 scripts/checkpatch.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 197436b20288..8db0f26601c5 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -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\.\-]+:/ ||
-- 
2.25.1

_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Linux-kernel-mentees] [PATCH] Checkpatch: Disables commit length check/warning in commit log in case of valid signature tags
  2020-07-19 17:15 [Linux-kernel-mentees] [PATCH] Checkpatch: Disables commit length check/warning in commit log in case of valid signature tags Nachiket Naganure
@ 2020-07-19 17:36 ` Lukas Bulwahn
  2020-07-20 12:22   ` Nachiket N
  0 siblings, 1 reply; 4+ messages in thread
From: Lukas Bulwahn @ 2020-07-19 17:36 UTC (permalink / raw)
  To: Nachiket Naganure; +Cc: linux-kernel-mentees


[-- Attachment #1.1: Type: text/plain, Size: 1113 bytes --]

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

On So., 19. Juli 2020 at 19:16, Nachiket Naganure <nachiketun8@gmail.com>
wrote:

> From: NachiketUN <nachiketun8@gmail.com>
>
> Signed-off-by: NachiketUN <nachiketun8@gmail.com>
> ---
>  scripts/checkpatch.pl | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 197436b20288..8db0f26601c5 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -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\.\-]+:/ ||
> --
> 2.25.1
>
>

[-- Attachment #1.2: Type: text/html, Size: 2159 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Linux-kernel-mentees] [PATCH] Checkpatch: Disables commit length check/warning in commit log in case of valid signature tags
  2020-07-19 17:36 ` Lukas Bulwahn
@ 2020-07-20 12:22   ` Nachiket N
  2020-07-20 16:23     ` Lukas Bulwahn
  0 siblings, 1 reply; 4+ messages in thread
From: Nachiket N @ 2020-07-20 12:22 UTC (permalink / raw)
  To: Lukas Bulwahn; +Cc: linux-kernel-mentees


[-- Attachment #1.1: Type: text/plain, Size: 1800 bytes --]

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:
syzbot+db339689b2101f6f6071@syzkaller.appspotmail.com
in patch generated by commit ID ac854131d984.
It does not output commit warning for in such cases.

On Sun, Jul 19, 2020 at 11:07 PM Lukas Bulwahn <lukas.bulwahn@gmail.com>
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
>
> On So., 19. Juli 2020 at 19:16, Nachiket Naganure <nachiketun8@gmail.com>
> wrote:
>
>> From: NachiketUN <nachiketun8@gmail.com>
>>
>> Signed-off-by: NachiketUN <nachiketun8@gmail.com>
>> ---
>>  scripts/checkpatch.pl | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
>> index 197436b20288..8db0f26601c5 100755
>> --- a/scripts/checkpatch.pl
>> +++ b/scripts/checkpatch.pl
>> @@ -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\.\-]+:/ ||
>> --
>> 2.25.1
>>
>>

[-- Attachment #1.2: Type: text/html, Size: 3303 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Linux-kernel-mentees] [PATCH] Checkpatch: Disables commit length check/warning in commit log in case of valid signature tags
  2020-07-20 12:22   ` Nachiket N
@ 2020-07-20 16:23     ` Lukas Bulwahn
  0 siblings, 0 replies; 4+ messages in thread
From: Lukas Bulwahn @ 2020-07-20 16:23 UTC (permalink / raw)
  To: Nachiket N; +Cc: linux-kernel-mentees


[-- Attachment #1.1: Type: text/plain, Size: 2110 bytes --]

On Monday, July 20, 2020, Nachiket N <nachiketun8@gmail.com> wrote:

> 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: syzbot+db339689b2101f6f6071@
> syzkaller.appspotmail.com
> in patch generated by commit ID ac854131d984.
> It does not output commit warning for in such cases.
>
>>
>>
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 <lukas.bulwahn@gmail.com>
> 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
>>
>> On So., 19. Juli 2020 at 19:16, Nachiket Naganure <nachiketun8@gmail.com>
>> wrote:
>>
>>> From: NachiketUN <nachiketun8@gmail.com>
>>>
>>> Signed-off-by: NachiketUN <nachiketun8@gmail.com>
>>> ---
>>>  scripts/checkpatch.pl | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
>>> index 197436b20288..8db0f26601c5 100755
>>> --- a/scripts/checkpatch.pl
>>> +++ b/scripts/checkpatch.pl
>>> @@ -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\.\-]+:/ ||
>>> --
>>> 2.25.1
>>>
>>>

[-- Attachment #1.2: Type: text/html, Size: 4082 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-07-20 16:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-19 17:15 [Linux-kernel-mentees] [PATCH] Checkpatch: Disables commit length check/warning in commit log in case of valid signature tags Nachiket Naganure
2020-07-19 17:36 ` Lukas Bulwahn
2020-07-20 12:22   ` Nachiket N
2020-07-20 16:23     ` Lukas Bulwahn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).