summaryrefslogtreecommitdiff
path: root/utilities
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2018-05-09 11:26:06 -0700
committerBen Pfaff <blp@ovn.org>2018-05-10 16:28:46 -0700
commit09b94206e56cb0500fc898dd41ec743934799879 (patch)
tree94413a0a1f6b15bddfd5ae5595c97c22b810dcc7 /utilities
parent72e6cd990e13e7d853988780ef7f9761460a661f (diff)
downloadopenvswitch-09b94206e56cb0500fc898dd41ec743934799879.tar.gz
checkpatch: Fix filename matching.
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@ovn.org> Acked-by: Aaron Conole <aconole@redhat.com> Acked-by: Numan Siddique <nusiddiq@redhat.com>
Diffstat (limited to 'utilities')
-rwxr-xr-xutilities/checkpatch.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py
index 1438e5aa4..61c123829 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")},