Spelling: avoid generated files with --commits

This commit is contained in:
Martin Mathieson 2021-01-16 22:59:12 +00:00
parent 6a271f90c5
commit 1979750a78
2 changed files with 12 additions and 2 deletions

View File

@ -272,6 +272,9 @@ def findStrings(filename):
# Test for whether the given file was automatically generated.
def isGeneratedFile(filename):
if not filename.endswith('.c'):
return False
# Open file
f_read = open(os.path.join(filename), 'r')
lines_tested = 0
@ -363,7 +366,7 @@ elif args.commits:
files = [f.decode('utf-8')
for f in subprocess.check_output(command).splitlines()]
# Will examine dissector files only
files = list(filter(lambda f : isAppropriateFile(f), files))
files = list(filter(lambda f : isAppropriateFile(f) and not isGeneratedFile(f), files))
elif args.open:
# Unstaged changes.
command = ['git', 'diff', '--name-only']

View File

@ -1,4 +1,3 @@
0x%02x
0x%08x
16bit
@ -64,6 +63,7 @@ authtype
autoconfiguration
autodiscovery
autoneg
autosar
available
avaya
backend
@ -85,6 +85,7 @@ blackhole
bnode
bootfile
bootloader
bootopt
bootp
broadcom
bsmap
@ -251,6 +252,7 @@ desegment
desegmentation
desegmenting
deselect
devcap
devmode
dfilter
dfsauth
@ -429,6 +431,7 @@ initializers
initializes
initializing
inline
inode
interferer
interleaving
interruptible
@ -492,6 +495,7 @@ manuf
mappable
maybefcs
mcast
mcsset
measurements
megabit
megaco
@ -549,6 +553,7 @@ multirat
multirate
multislot
multistate
mumbai
nacks
namelen
namespace
@ -673,6 +678,7 @@ protected
protoabbrev
protobuf
protocolie
proxying
pscell
pseudowire
ptvcursor
@ -850,6 +856,7 @@ spoofing
spooled
srbid
srcport
srvcc
ssupervisor
stateful
statusbar