.setDescription("Coverage of new/changed code")
.setDirection(Metric.DIRECTION_BETTER)
.setQualitative(true)
- .setHidden(true)
.setDomain(DOMAIN_TESTS)
.setWorstValue(0.0)
.setBestValue(100.0)
.setQualitative(false)
.setDomain(DOMAIN_TESTS)
.setFormula(new SumChildValuesFormula(false))
- .setHidden(true)
.create();
public static final String UNCOVERED_LINES_KEY = "uncovered_lines";
.setDescription("New uncovered lines")
.setDirection(Metric.DIRECTION_WORST)
.setDomain(DOMAIN_TESTS)
- .setHidden(true)
.setFormula(new SumChildValuesFormula(false))
.create();
.setQualitative(true)
.setWorstValue(0.0)
.setBestValue(100.0)
- .setHidden(true)
.setDomain(DOMAIN_TESTS)
.create();
.setDescription("New conditions to cover")
.setDomain(DOMAIN_TESTS)
.setFormula(new SumChildValuesFormula(false))
- .setHidden(true)
.create();
public static final String UNCOVERED_CONDITIONS_KEY = "uncovered_conditions";
.setDescription("New uncovered conditions")
.setDirection(Metric.DIRECTION_WORST)
.setDomain(DOMAIN_TESTS)
- .setHidden(true)
.setFormula(new SumChildValuesFormula(false))
.create();
.setDescription("Branch coverage of new/changed code")
.setDirection(Metric.DIRECTION_BETTER)
.setQualitative(true)
- .setHidden(true)
.setDomain(DOMAIN_TESTS)
.setWorstValue(0.0)
.setBestValue(100.0)
@display_violations=true
@global_violations=[]
@expandable=(@lines!=nil)
+ @filtered=!@expanded
conditions='snapshot_id=?'
values=[@snapshot.id]
def filter_lines_by_date
if @period
+ @filtered=true
to=@snapshot.period_datetime(@period)
if to
@lines.each do |line|
measures.each do |measure|
next unless measure.metric
- if measure.metric.timemachine?
+ if measure.metric.timemachine? && measure.value
row=rows_by_metric_id[measure.metric_id]
unless row
row=Sonar::TimemachineRow.new(measure.metric)
# * <tt>:url</tt> - add an url on the measure.
# * <tt>:prefix</tt> - add a prefix. Default is ''.
# * <tt>:suffix</tt> - add a suffix. Default is ''.
+ # * <tt>:period</tt> - period index, from 1 to 5. Optional. Default is nil.
# * <tt>:default</tt> - text to return if metric or measure not found. Default is blank string.
#
# === Examples
<table id="drilldown" class="width100">
<% if @highlighted_metric!=@metric %>
<tr>
-<td colspan="<%= @drilldown.columns.size -%>">Drilldown on <b><span id="m_<%= u @metric.key -%>"><%= @snapshot.f_measure(@metric.key) -%></span> <%= @metric.short_name -%></b></td>
+<td colspan="<%= @drilldown.columns.size -%>">Drilldown on <b><%= format_measure(@metric.key, :period => @period) -%> <%= @metric.short_name -%></b></td>
</tr>
<tr>
<% end
colspan+=2 if @display_coverage
previous_hidden=false
first_section=true
+ has_displayed_lines=false
@lines.each_with_index do |line, index|
if line.hidden
previous_hidden=true
next
end
+ has_displayed_lines=true
if previous_hidden && !first_section
current_revision=nil
</tr>
<% end %>
</table>
+
+ <% if @filtered && !has_displayed_lines %>
+ <p>No lines match your filter criteria.</p>
+ <% end %>
<% end %>
\ No newline at end of file