Skip to content

Allow coverage to check for every class that are sharing the same file #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions doxy-coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,11 @@ def parse(path):

file_fp = os.path.join (path, "%s.xml" %(entry.get('refid')))
tmp = parse_file (file_fp)
files[tmp[0]] = tmp[1]
if tmp[1]:
if tmp[0] in files:
files[tmp[0]].append(tmp[1])
else:
files[tmp[0]] = [tmp[1]]

return files

Expand All @@ -123,8 +127,8 @@ def get_coverage (f):
if not defs:
return 100

doc_yes = len([d for d in defs.values() if d])
doc_no = len([d for d in defs.values() if not d])
doc_yes = len([d[k] for d in defs for k in d if d[k]])
doc_no = len([d[k] for d in defs for k in d if not d[k]])
return (doc_yes * 100.0 / (doc_yes + doc_no))

def file_cmp (a,b):
Expand All @@ -136,7 +140,6 @@ def file_cmp (a,b):

total_yes = 0
total_no = 0

for f in files_sorted:
skip = False
for exclude_dir in exclude_dirs:
Expand All @@ -150,20 +153,19 @@ def file_cmp (a,b):
if not defs:
continue

doc_yes = len([d for d in defs.values() if d])
doc_no = len([d for d in defs.values() if not d])
doc_yes = len([d[k] for d in defs for k in d if d[k]])
doc_no = len([d[k] for d in defs for k in d if not d[k]])
doc_per = doc_yes * 100.0 / (doc_yes + doc_no)

total_yes += doc_yes
total_no += doc_no

print ('%3d%% - %s - (%d of %d)'%(doc_per, f, doc_yes, (doc_yes + doc_no)))

defs_sorted = defs.keys()
defs_sorted = [k for d in defs for k in d if not d[k]]
defs_sorted.sort()
for d in defs_sorted:
if not defs[d]:
print ("\t", d)
print ("\t", d)

total_all = total_yes + total_no
total_per = total_yes * 100 / total_all
Expand Down