diff --git a/src/templates/index.html b/src/templates/index.html index 227a176..5b97b7a 100644 --- a/src/templates/index.html +++ b/src/templates/index.html @@ -11,7 +11,9 @@ {{ kind }} Line Coverage Functions - Branches + {% if branch_enabled %} + Branches + {% endif %} diff --git a/src/templates/macros.html b/src/templates/macros.html index 2a967fa..a6ae0b7 100644 --- a/src/templates/macros.html +++ b/src/templates/macros.html @@ -21,7 +21,9 @@ {% endmacro %} @@ -30,8 +32,10 @@ {%- set lines_sev = lines_per | severity(kind="lines") -%} {%- set functions_per = percent(num=stats.covered_funs, den=stats.total_funs) -%} {%- set functions_sev = functions_per | severity(kind="functions") -%} - {%- set branches_per = percent(num=stats.covered_branches, den=stats.total_branches) -%} - {%- set branches_sev = branches_per | severity(kind="branches") -%} + {% if branch_enabled %} + {%- set branches_per = percent(num=stats.covered_branches, den=stats.total_branches) -%} + {%- set branches_sev = branches_per | severity(kind="branches") -%} + {% endif %} {{ name }} @@ -53,7 +57,9 @@ {{ functions_per | round(precision=precision) }}% {{ stats.covered_funs }} / {{ stats.total_funs }} - {{ branches_per | round(precision=precision) }}% - {{ stats.covered_branches }} / {{ stats.total_branches }} + {% if branch_enabled %} + {{ branches_per | round(precision=precision) }}% + {{ stats.covered_branches }} / {{ stats.total_branches }} + {% endif %} {% endmacro %}