]> git.proxmox.com Git - mirror_ovs.git/commitdiff
checkpatch: Skip words containing numbers.
authorIlya Maximets <i.maximets@ovn.org>
Sat, 7 Dec 2019 17:10:24 +0000 (18:10 +0100)
committerIlya Maximets <i.maximets@ovn.org>
Mon, 9 Dec 2019 20:14:26 +0000 (21:14 +0100)
Words like 'br0' are common and usually references some code or
database objects that should not be targets for spell checking.
So, it's better to skip all the words that has digits inside instead
of ones that starts with numbers.

Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Acked-by: Aaron Conole <aconole@redhat.com>
Acked-by: William Tu <u9012063@gmail.com>
utilities/checkpatch.py

index 6d95b0e2fe1a14a96a590794d5f4d0ba40bc6f22..1b14ca5d5397925a340649e275b38490baee133a 100755 (executable)
@@ -396,8 +396,8 @@ def check_comment_spelling(line):
                                      strword[1:].islower()):
                 skip = True
 
-            # skip words that start with numbers
-            if strword.startswith(tuple('0123456789')):
+            # skip words containing numbers
+            if any(check_char.isdigit() for check_char in strword):
                 skip = True
 
             if not skip: