diff --git a/tools/check_spelling.py b/tools/check_spelling.py index e327c078f0..7a12068e89 100755 --- a/tools/check_spelling.py +++ b/tools/check_spelling.py @@ -119,7 +119,7 @@ class File: return False - # Check the spelling of all the words we have found fir tgus fuke, + # Check the spelling of all the words we have found def spellCheck(self): num_values = len(self.values) @@ -230,13 +230,16 @@ def removeSingleQuotes(code_string): return code_string def removeHexSpecifiers(code_string): - # TODO: replace with single regexp? - code_string = code_string.replace('0x%02X', "") - code_string = code_string.replace('0x%02x', "") - code_string = code_string.replace('0x%04X', "") - code_string = code_string.replace('0x%04x', "") - code_string = code_string.replace('0x%08X', "") - code_string = code_string.replace('0x%08x', "") + # Find all hex numbers + + looking = True + while looking: + m = re.search(r'(0x[0-9a-fA-F]*)', code_string) + if m: + code_string = code_string.replace(m.group(0), "") + else: + looking = False + return code_string @@ -418,7 +421,7 @@ for f in files: -# Show the most commonly not-recognised words. TODO: depend upon a command-line option here? +# Show the most commonly not-recognised words. print('') counter = Counter(missing_words).most_common(100) if len(counter) > 0: diff --git a/tools/wireshark_words.txt b/tools/wireshark_words.txt index e1e0af7fb1..421d61fbae 100644 --- a/tools/wireshark_words.txt +++ b/tools/wireshark_words.txt @@ -47,6 +47,7 @@ asn2wrs assymetric async asynchronously +asyncmap atheros atomically attendee @@ -119,6 +120,7 @@ capinfos capsa captioning capwap +cardbus carrierfreq carrierid categorizes @@ -127,6 +129,7 @@ ccpch cctrch cdma2000 celcius +celeron cellid cellidentity centiseconds @@ -398,6 +401,7 @@ hspdsch hsupa http2 https +huffman icmpv ident idl2wrs @@ -563,6 +567,7 @@ netboot netfilter netflow nethop +netkeyindex netlink netlogon netmask @@ -617,6 +622,7 @@ oplock opnum optimizations optimizer +optiplex ospf6 outhdr packetcable @@ -641,6 +647,7 @@ pdcch pdsch peeraddr periodicities +phaser phich phonebook physcellid @@ -690,8 +697,10 @@ pytest qam16 qam64 qnet6 +quadro quintuplet quintuplets +radeon radiotap ralink ranap @@ -916,8 +925,11 @@ tdd128 tdd384 tdd768 technica +telenor teletex +telia teredo +tesla text2pcap timeout timeslot @@ -991,6 +1003,7 @@ unfragmented unhandled unicast unicode +unicom unignore unimplemented uninitialized @@ -1091,5 +1104,6 @@ wsluarm x509sat xchannel xmlns +xtreme z3950 zigbee