diff mbox series

[ovs-dev,1/1] checkpatch: Don't spell check Fixes tag

Message ID 20231102125941.750824-1-roid@nvidia.com
State Accepted
Commit bf843fd439b25e2048f8b2b466557bd3d682072d
Delegated to: Simon Horman
Headers show
Series [ovs-dev,1/1] checkpatch: Don't spell check Fixes tag | expand

Checks

Context Check Description
ovsrobot/apply-robot warning apply and check: warning
ovsrobot/github-robot-_Build_and_Test success github build: passed

Commit Message

Roi Dayan Nov. 2, 2023, 12:59 p.m. UTC
From: Eli Britstein <elibr@nvidia.com>

Fixes tag quotes another commit that might fail in a spell check. Don't
fail it.

Signed-off-by: Eli Britstein <elibr@nvidia.com>
Acked-by: Roi Dayan <roid@nvidia.com>
---
 utilities/checkpatch.py | 3 +++
 1 file changed, 3 insertions(+)

Comments

Roi Dayan Nov. 2, 2023, 1:09 p.m. UTC | #1
On 02/11/2023 14:59, Roi Dayan wrote:
> From: Eli Britstein <elibr@nvidia.com>
> 
> Fixes tag quotes another commit that might fail in a spell check. Don't
> fail it.
> 
> Signed-off-by: Eli Britstein <elibr@nvidia.com>
> Acked-by: Roi Dayan <roid@nvidia.com>
> ---
>  utilities/checkpatch.py | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py
> index a56f429d4c38..6b210fab8385 100755
> --- a/utilities/checkpatch.py
> +++ b/utilities/checkpatch.py
> @@ -409,6 +409,9 @@ def check_spelling(line, comment):
>      if not spell_check_dict or not spellcheck:
>          return False
>  
> +    if line.startswith('Fixes: '):
> +        return False
> +
>      words = filter_comments(line, True) if comment else line
>      words = words.replace(':', ' ').split(' ')
>  

Forgot to add a dot at the end of the title.
do you need me to send v2 or can be amended?
Eelco Chaudron Nov. 2, 2023, 1:56 p.m. UTC | #2
On 2 Nov 2023, at 13:59, Roi Dayan via dev wrote:

> From: Eli Britstein <elibr@nvidia.com>
>
> Fixes tag quotes another commit that might fail in a spell check. Don't
> fail it.
>
> Signed-off-by: Eli Britstein <elibr@nvidia.com>
> Acked-by: Roi Dayan <roid@nvidia.com>
> ---
>  utilities/checkpatch.py | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py
> index a56f429d4c38..6b210fab8385 100755
> --- a/utilities/checkpatch.py
> +++ b/utilities/checkpatch.py
> @@ -409,6 +409,9 @@ def check_spelling(line, comment):
>      if not spell_check_dict or not spellcheck:
>          return False
>
> +    if line.startswith('Fixes: '):
> +        return False

My initial thought was, should we not match it more precisely with something like is_fixes_exact? But it seems like not an issue as using “Fixes: “ to summarize stuff would fail anyway.

So this looks good to me!

  Acked-by: Eelco Chaudron <echaudro@redhat.com>

I guess who ever commits this patch can add the . at the end of the subject.

//Eelco

> +
>      words = filter_comments(line, True) if comment else line
>      words = words.replace(':', ' ').split(' ')
>
> -- 
> 2.40.1
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Simon Horman Nov. 3, 2023, 5:19 p.m. UTC | #3
On Thu, Nov 02, 2023 at 02:56:41PM +0100, Eelco Chaudron wrote:
> 
> 
> On 2 Nov 2023, at 13:59, Roi Dayan via dev wrote:
> 
> > From: Eli Britstein <elibr@nvidia.com>
> >
> > Fixes tag quotes another commit that might fail in a spell check. Don't
> > fail it.
> >
> > Signed-off-by: Eli Britstein <elibr@nvidia.com>
> > Acked-by: Roi Dayan <roid@nvidia.com>
> > ---
> >  utilities/checkpatch.py | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py
> > index a56f429d4c38..6b210fab8385 100755
> > --- a/utilities/checkpatch.py
> > +++ b/utilities/checkpatch.py
> > @@ -409,6 +409,9 @@ def check_spelling(line, comment):
> >      if not spell_check_dict or not spellcheck:
> >          return False
> >
> > +    if line.startswith('Fixes: '):
> > +        return False
> 
> My initial thought was, should we not match it more precisely with something like is_fixes_exact? But it seems like not an issue as using “Fixes: “ to summarize stuff would fail anyway.
> 
> So this looks good to me!
> 
>   Acked-by: Eelco Chaudron <echaudro@redhat.com>
> 
> I guess who ever commits this patch can add the . at the end of the subject.

Thanks, applied with a '.' appended to the subject.

- checkpatch: Don't spell check Fixes tag.
  https://github.com/openvswitch/ovs/commit/bf843fd439b2
Roi Dayan Nov. 5, 2023, 7:18 a.m. UTC | #4
On 02/11/2023 15:56, Eelco Chaudron wrote:
> 
> 
> On 2 Nov 2023, at 13:59, Roi Dayan via dev wrote:
> 
>> From: Eli Britstein <elibr@nvidia.com>
>>
>> Fixes tag quotes another commit that might fail in a spell check. Don't
>> fail it.
>>
>> Signed-off-by: Eli Britstein <elibr@nvidia.com>
>> Acked-by: Roi Dayan <roid@nvidia.com>
>> ---
>>  utilities/checkpatch.py | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py
>> index a56f429d4c38..6b210fab8385 100755
>> --- a/utilities/checkpatch.py
>> +++ b/utilities/checkpatch.py
>> @@ -409,6 +409,9 @@ def check_spelling(line, comment):
>>      if not spell_check_dict or not spellcheck:
>>          return False
>>
>> +    if line.startswith('Fixes: '):
>> +        return False
> 
> My initial thought was, should we not match it more precisely with something like is_fixes_exact? But it seems like not an issue as using “Fixes: “ to summarize stuff would fail anyway.

I saw it but thought its too much to use this regex. There is the fixes line check before the spell check and the spell check shouldn't care.
even if the fixes line is not exact we dont need the spell check to fail there.

thanks for the review.

> 
> So this looks good to me!
> 
>   Acked-by: Eelco Chaudron <echaudro@redhat.com>
> 
> I guess who ever commits this patch can add the . at the end of the subject.
> 
> //Eelco
> 
>> +
>>      words = filter_comments(line, True) if comment else line
>>      words = words.replace(':', ' ').split(' ')
>>
>> -- 
>> 2.40.1
>>
>> _______________________________________________
>> dev mailing list
>> dev@openvswitch.org
>> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
diff mbox series

Patch

diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py
index a56f429d4c38..6b210fab8385 100755
--- a/utilities/checkpatch.py
+++ b/utilities/checkpatch.py
@@ -409,6 +409,9 @@  def check_spelling(line, comment):
     if not spell_check_dict or not spellcheck:
         return False
 
+    if line.startswith('Fixes: '):
+        return False
+
     words = filter_comments(line, True) if comment else line
     words = words.replace(':', ' ').split(' ')