[ovs-dev] [PATCH] checkpatch: Fix filename matching.
Numan Siddique
nusiddiq at redhat.com
Thu May 10 17:42:39 UTC 2018
On Wed, May 9, 2018 at 11:56 PM, Ben Pfaff <blp at ovn.org> wrote:
> The .match() method only matches at the beginning of a string but the
> blacklists here need to match anywhere in a string.
>
> Signed-off-by: Ben Pfaff <blp at ovn.org>
>
Acked-by: Numan Siddique <nusiddiq at redhat.com>
Thanks Ben. With this patch I don't see the warnings which I observed
earlier with the IPv6 patch.
> ---
> utilities/checkpatch.py | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py
> index 1438e5aa4401..61c123829610 100755
> --- a/utilities/checkpatch.py
> +++ b/utilities/checkpatch.py
> @@ -458,14 +458,12 @@ file_checks = [
>
> checks = [
> {'regex': None,
> - 'match_name':
> - lambda x: not line_length_blacklist.match(x),
> + 'match_name': lambda x: not line_length_blacklist.search(x),
> 'check': lambda x: line_length_check(x),
> 'print': lambda: print_warning("Line length is >79-characters
> long")},
>
> {'regex': None,
> - 'match_name':
> - lambda x: not leading_whitespace_blacklist.match(x),
> + 'match_name': lambda x: not leading_whitespace_blacklist.search(x),
> 'check': lambda x: not leading_whitespace_is_spaces(x),
> 'print': lambda: print_warning("Line has non-spaces leading
> whitespace")},
>
> --
> 2.16.1
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
More information about the dev
mailing list