From e3eafbdd3a9bd998a5d371a0369a19f998bc964d Mon Sep 17 00:00:00 2001 From: Dominik Nakamura Date: Mon, 25 Sep 2023 11:29:38 +0900 Subject: [PATCH] feat: mark partially-covered lines in yellow 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. --- assets/index.css | 8 ++++++++ templates/source.html | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/assets/index.css b/assets/index.css index 69d6301..bd5b0cd 100644 --- a/assets/index.css +++ b/assets/index.css @@ -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; } @@ -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; } diff --git a/templates/source.html b/templates/source.html index 281c95b..ff43439 100644 --- a/templates/source.html +++ b/templates/source.html @@ -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 %}