Re: [ovs-dev] [PATCH v2 1/3] checkpatch: reorganize flagged words using a list

2023-07-11 Thread Aaron Conole
Chandan Somani  writes:

> Single out flagged words and allow for more useful
> details, like spelling suggestions. Fixed syntax
> error from v1
>
> Signed-off-by: Chandan Somani 
> ---

Thanks!

Acked-by: Aaron Conole 

>  utilities/checkpatch.py | 12 +---
>  1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py
> index 64f0efeb4..acf9a0102 100755
> --- a/utilities/checkpatch.py
> +++ b/utilities/checkpatch.py
> @@ -411,6 +411,8 @@ def check_spelling(line, comment):
>  words = filter_comments(line, True) if comment else line
>  words = words.replace(':', ' ').split(' ')
>  
> +flagged_words = []
> +
>  for word in words:
>  skip = False
>  strword = re.subn(r'\W+', '', word)[0].replace(',', '')
> @@ -435,9 +437,13 @@ def check_spelling(line, comment):
>  skip = True
>  
>  if not skip:
> -print_warning("Check for spelling mistakes (e.g. \"%s\")"
> -  % strword)
> -return True
> +flagged_words.append(strword)
> +
> +if len(flagged_words) > 0:
> +for mistake in flagged_words:
> +print_warning("Possible misspelled word: \"%s\"" % mistake)
> +
> +return True
>  
>  return False

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v2 1/3] checkpatch: reorganize flagged words using a list

2023-07-11 Thread Eelco Chaudron


On 7 Jul 2023, at 22:07, Chandan Somani wrote:

> Single out flagged words and allow for more useful
> details, like spelling suggestions. Fixed syntax
> error from v1
>
> Signed-off-by: Chandan Somani 

Hi Chandan,

Thanks for the patch! I think it looks good, however some small comments on the 
message format.

The version information should not be part of your commit message but should be 
moved down (see example below). In addition, your patch subject should start 
with a capital and end with a dot:

  ‘checkpatch: Reorganize flagged words using a list.’

Don’t worry about it for this series. I will fix it on commit.

Acked-by: Eelco Chaudron 

> ---

v2: Fixed syntax error in length comparison.


>  utilities/checkpatch.py | 12 +---
>  1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py
> index 64f0efeb4..acf9a0102 100755
> --- a/utilities/checkpatch.py
> +++ b/utilities/checkpatch.py
> @@ -411,6 +411,8 @@ def check_spelling(line, comment):
>  words = filter_comments(line, True) if comment else line
>  words = words.replace(':', ' ').split(' ')
>
> +flagged_words = []
> +
>  for word in words:
>  skip = False
>  strword = re.subn(r'\W+', '', word)[0].replace(',', '')
> @@ -435,9 +437,13 @@ def check_spelling(line, comment):
>  skip = True
>
>  if not skip:
> -print_warning("Check for spelling mistakes (e.g. \"%s\")"
> -  % strword)
> -return True
> +flagged_words.append(strword)
> +
> +if len(flagged_words) > 0:
> +for mistake in flagged_words:
> +print_warning("Possible misspelled word: \"%s\"" % mistake)
> +
> +return True
>
>  return False
>
> -- 
> 2.26.3
>
> ___
> dev mailing list
> d...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v2 1/3] checkpatch: reorganize flagged words using a list

2023-07-07 Thread Chandan Somani
Single out flagged words and allow for more useful
details, like spelling suggestions. Fixed syntax
error from v1

Signed-off-by: Chandan Somani 
---
 utilities/checkpatch.py | 12 +---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py
index 64f0efeb4..acf9a0102 100755
--- a/utilities/checkpatch.py
+++ b/utilities/checkpatch.py
@@ -411,6 +411,8 @@ def check_spelling(line, comment):
 words = filter_comments(line, True) if comment else line
 words = words.replace(':', ' ').split(' ')
 
+flagged_words = []
+
 for word in words:
 skip = False
 strword = re.subn(r'\W+', '', word)[0].replace(',', '')
@@ -435,9 +437,13 @@ def check_spelling(line, comment):
 skip = True
 
 if not skip:
-print_warning("Check for spelling mistakes (e.g. \"%s\")"
-  % strword)
-return True
+flagged_words.append(strword)
+
+if len(flagged_words) > 0:
+for mistake in flagged_words:
+print_warning("Possible misspelled word: \"%s\"" % mistake)
+
+return True
 
 return False
 
-- 
2.26.3

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev