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 <[email protected]>

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 <[email protected]>

> ---

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
> [email protected]
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to