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