From 1e763be2b821c6194d4f0b3fa8cb04885535ea96 Mon Sep 17 00:00:00 2001 From: Dragisa Krsmanovic Date: Thu, 7 Nov 2013 23:50:47 -0800 Subject: [PATCH] Add line coverage % column. Fixes #1 --- src/main/scala/de/johoop/jacoco4sbt/ScalaHtmlFormatter.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/scala/de/johoop/jacoco4sbt/ScalaHtmlFormatter.scala b/src/main/scala/de/johoop/jacoco4sbt/ScalaHtmlFormatter.scala index fff24c8d..9abe7778 100644 --- a/src/main/scala/de/johoop/jacoco4sbt/ScalaHtmlFormatter.scala +++ b/src/main/scala/de/johoop/jacoco4sbt/ScalaHtmlFormatter.scala @@ -41,6 +41,7 @@ class ScalaHtmlFormatter(withBranchCoverage: Boolean) extends HTMLFormatter { t.add("Element", null, new LabelColumn, false) t.add("Missed Lines", Styles.BAR, new BarColumn(ICoverageNode.CounterEntity.LINE, getLocale), true) t.add("Total Lines", Styles.CTR1, CounterColumn.newTotal(ICoverageNode.CounterEntity.LINE, getLocale), false) + t.add("Cov.", Styles.CTR2, new PercentageColumn(ICoverageNode.CounterEntity.LINE, getLocale), false) if (withBranchCoverage) { t.add("Missed Branches", Styles.BAR, new BarColumn(ICoverageNode.CounterEntity.BRANCH, getLocale), false) t.add("Cov.", Styles.CTR2, new PercentageColumn(ICoverageNode.CounterEntity.BRANCH, getLocale), false) @@ -55,4 +56,4 @@ class ScalaHtmlFormatter(withBranchCoverage: Boolean) extends HTMLFormatter { table.add("Missed", Styles.CTR1, CounterColumn.newMissed(entity, getLocale), false) table.add(label, Styles.CTR2, CounterColumn.newTotal(entity, getLocale), false) } -} \ No newline at end of file +}