Skip to content
Snippets Groups Projects
Commit e58f57b7 authored by Henning Glawe's avatar Henning Glawe
Browse files

remove special treatment of RE_EMPTY

instead, make RE_EMPTY the default/fallback for global coverageIgnore
parent 35f1b23e
Branches
Tags
No related merge requests found
......@@ -13,7 +13,8 @@ class Annotator(object):
def __init__(self, annotateFilename=None, coverageIgnore=None,
formatNameWidth=15, formatSourceWidth=20):
self.matchHighlighter = MatchHighlighter()
self.coverageIgnore = coverageIgnore
# ignore empty lines by default in coverage analysis
self.coverageIgnore = coverageIgnore if coverageIgnore else RE_EMPTY
if annotateFilename is None:
self.annotateFile = None
else:
......@@ -52,15 +53,10 @@ class Annotator(object):
elif matcher.does_nothing:
matcher_does_nothing = True
else:
m2 = RE_EMPTY.match(line)
m2 = self.coverageIgnore.match(line)
if m2:
global_ignore = True
match = m2
elif self.coverageIgnore is not None:
m2 = self.coverageIgnore.match(line)
if m2:
global_ignore = True
match = m2
# update counters
self.counter['total'] += 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment