Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
python-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
nomad-lab
python-common
Commits
aad167e3
Commit
aad167e3
authored
8 years ago
by
Henning Glawe
Browse files
Options
Downloads
Patches
Plain Diff
different matchlabels for local and global coverageIgnore
parent
1226f315
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/python/nomadcore/annotator.py
+10
-7
10 additions, 7 deletions
common/python/nomadcore/annotator.py
with
10 additions
and
7 deletions
common/python/nomadcore/annotator.py
+
10
−
7
View file @
aad167e3
...
@@ -42,28 +42,31 @@ class Annotator(object):
...
@@ -42,28 +42,31 @@ class Annotator(object):
return
1
return
1
# classify match
# classify match
full
=
match
and
match
.
start
()
==
0
and
match
.
end
()
==
len
(
line
)
full
=
match
and
match
.
start
()
==
0
and
match
.
end
()
==
len
(
line
)
ignore
=
False
local_ignore
=
False
global_ignore
=
False
matcher_does_nothing
=
False
matcher_does_nothing
=
False
if
match
:
if
match
:
if
matcher
.
coverageIgnore
:
if
matcher
.
coverageIgnore
:
ignore
=
True
local_
ignore
=
True
elif
matcher
.
does_nothing
:
elif
matcher
.
does_nothing
:
matcher_does_nothing
=
True
matcher_does_nothing
=
True
else
:
else
:
m2
=
RE_EMPTY
.
match
(
line
)
m2
=
RE_EMPTY
.
match
(
line
)
if
m2
:
if
m2
:
ignore
=
True
global_
ignore
=
True
match
=
m2
match
=
m2
elif
self
.
coverageIgnore
is
not
None
:
elif
self
.
coverageIgnore
is
not
None
:
m2
=
self
.
coverageIgnore
.
match
(
line
)
m2
=
self
.
coverageIgnore
.
match
(
line
)
if
m2
:
if
m2
:
ignore
=
True
global_
ignore
=
True
match
=
m2
match
=
m2
# setup match label
# setup match label
matchlabel
=
''
matchlabel
=
''
if
ignore
:
if
local_ignore
:
matchlabel
=
'
ign
'
matchlabel
=
'
l_ign
'
elif
global_ignore
:
matchlabel
=
'
g_ign
'
elif
match
:
elif
match
:
if
matcher_does_nothing
:
if
matcher_does_nothing
:
matchlabel
=
'
n_
'
matchlabel
=
'
n_
'
...
@@ -73,7 +76,7 @@ class Annotator(object):
...
@@ -73,7 +76,7 @@ class Annotator(object):
else
:
else
:
matchlabel
=
'
no
'
matchlabel
=
'
no
'
# highlight line
# highlight line
if
ignore
:
if
local_ignore
or
global_
ignore
:
highlighted
=
self
.
matchHighlighter
.
highlight
(
highlighted
=
self
.
matchHighlighter
.
highlight
(
match
,
line
,
linecolor
=
ANSI
.
FG_BLUE
)
match
,
line
,
linecolor
=
ANSI
.
FG_BLUE
)
elif
matcher_does_nothing
:
elif
matcher_does_nothing
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment