Skip to content

Commit

Permalink
feat: mark partially-covered lines in yellow
Browse files Browse the repository at this point in the history
So far lines that are covered but have missing function calls
(instantiations) were marked with red. To better indicate that they're
basically called but have a few missing instantiations a new yellow
color is introduced for those.
  • Loading branch information
dnaka91 committed Sep 25, 2023
1 parent 3ac5439 commit e3eafbd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions assets/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@
@apply bg-red-400 hover:bg-red-500 dark:bg-red-800 dark:hover:bg-red-700;
}

.partially-covered {
@apply bg-yellow-400 hover:bg-yellow-500 dark:bg-yellow-800 dark:hover:bg-yellow-700;
}

.gutter.covered {
@apply bg-green-400 dark:bg-green-800 !important;
}
Expand All @@ -138,6 +142,10 @@
@apply bg-red-400 dark:bg-red-800 !important;
}

.gutter.partially-covered {
@apply bg-yellow-400 dark:bg-yellow-800 !important;
}

.page-footer {
@apply text-sm font-bold pl-4 pt-4;
}
Expand Down
4 changes: 3 additions & 1 deletion templates/source.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@
{% match coverage %}
{% when Coverage::Covered(_) %}
{% let class = "covered" %}
{% when Coverage::Uncovered(_) %}
{% when Coverage::Uncovered(0) %}
{% let class = "uncovered" %}
{% when Coverage::Uncovered(_) %}
{% let class = "partially-covered" %}
{% when Coverage::Unknown %}
{% let class = "" %}
{% endmatch %}
Expand Down

0 comments on commit e3eafbd

Please sign in to comment.