From 78cc08630e2afbaaf221abe127411830360ed4f9 Mon Sep 17 00:00:00 2001 From: simonbrandhof Date: Wed, 16 Mar 2011 18:53:23 +0100 Subject: [PATCH] Improve new coverage widget --- .../org/sonar/plugins/core/widgets/code_coverage.html.erb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/code_coverage.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/code_coverage.html.erb index 3e165313f01..c1aaf0efac9 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/code_coverage.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/code_coverage.html.erb @@ -40,11 +40,13 @@ new_line_coverage=measure('new_line_coverage') new_branch_coverage=measure('new_branch_coverage') %>
-

On new code:

- <% if new_lines.to_i>0 %> +

On new code:

+ <% if new_lines.to_i==0 %> +

No new lines to cover

+ <% else %> <% if new_coverage %>

- <%= new_coverage.format_numeric_value(variation_value(new_coverage))||'-' -%> coverage + <%= new_coverage.format_numeric_value(variation_value(new_coverage))||'-' -%>

<% end %>

-- 2.39.5