1
0
mirror of https://github.com/pevans/erc-c.git synced 2024-06-25 12:29:34 +00:00

Don't count main.c

This commit is contained in:
Peter Evans 2018-01-07 15:08:03 -06:00
parent 55cb80162c
commit 366f10efcb

View File

@ -89,8 +89,11 @@ def has_test(fname, suite, test):
def walk(dname):
for root, subdirs, subfiles in os.walk(dname):
for fname in subfiles:
if fname[-2:] == '.c' or fname[-2:] == '.h':
parse(root + '/' + fname)
if fname == 'main.c':
continue
if fname[-2:] != '.c' and fname[-2:] != '.h':
continue
parse(root + '/' + fname)
# Walk through the src dir and see what we can see.
walk('./src')