From: David Gageot Date: Thu, 12 Jul 2012 16:29:23 +0000 (+0200) Subject: SONAR-3653 Weird branche coverage for new code X-Git-Tag: 3.2~100 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a285f8f4e89158ab569914aac97383b1b0432029;p=sonarqube.git SONAR-3653 Weird branche coverage for new code --- diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/coverage.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/coverage.html.erb index 6f9c3e5a1a8..8bfd6197fb1 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/coverage.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/coverage.html.erb @@ -36,9 +36,9 @@ if new_lines_to_cover_measure new_lines=new_lines_to_cover_measure.variation(dashboard_configuration.period_index) if new_lines - new_coverage=measure('new_coverage') - new_line_coverage=measure('new_line_coverage') - new_branch_coverage=measure('new_branch_coverage') + new_coverage=measure('new_coverage') if variation_value('new_coverage') + new_line_coverage=measure('new_line_coverage') if variation_value('new_line_coverage') + new_branch_coverage=measure('new_branch_coverage') if variation_value('new_branch_coverage') %>

<%= message('widget.code_coverage.on_new_code') -%>

<% if new_lines.to_i==0 %> @@ -46,17 +46,17 @@ <% else %> <% if new_coverage %>

- <%= format_variation(new_coverage, :style => 'none', :default => '-') -%> + <%= format_variation(new_coverage, :style => 'none') -%>

<% end %> <% if new_line_coverage %>

- <%= format_variation(new_line_coverage, :style => 'none', :default => '-') -%><%= message('widget.code_coverage.line_coverage.suffix') -%> + <%= format_variation(new_line_coverage, :style => 'none') -%><%= message('widget.code_coverage.line_coverage.suffix') -%>

<% end %> <% if new_branch_coverage %>

- <%= format_variation(new_branch_coverage, :style => 'none', :default => '-') -%><%= message('widget.code_coverage.branch_coverage.suffix') -%> + <%= format_variation(new_branch_coverage, :style => 'none') -%><%= message('widget.code_coverage.branch_coverage.suffix') -%>

<% end