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

different matchlabels for local and global coverageIgnore

parent 1226f315
Branches
Tags
No related merge requests found
......@@ -42,28 +42,31 @@ class Annotator(object):
return 1
# classify match
full = match and match.start() == 0 and match.end() == len(line)
ignore = False
local_ignore = False
global_ignore = False
matcher_does_nothing = False
if match:
if matcher.coverageIgnore:
ignore = True
local_ignore = True
elif matcher.does_nothing:
matcher_does_nothing = True
else:
m2 = RE_EMPTY.match(line)
if m2:
ignore = True
global_ignore = True
match = m2
elif self.coverageIgnore is not None:
m2 = self.coverageIgnore.match(line)
if m2:
ignore = True
global_ignore = True
match = m2
# setup match label
matchlabel = ''
if ignore:
matchlabel = 'ign'
if local_ignore:
matchlabel = 'l_ign'
elif global_ignore:
matchlabel = 'g_ign'
elif match:
if matcher_does_nothing:
matchlabel='n_'
......@@ -73,7 +76,7 @@ class Annotator(object):
else:
matchlabel = 'no'
# highlight line
if ignore:
if local_ignore or global_ignore:
highlighted = self.matchHighlighter.highlight(
match, line, linecolor=ANSI.FG_BLUE)
elif matcher_does_nothing:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment