Skip to content

Commit

Permalink
Merge pull request #59 from fidalgo/fidalgo/add-red-badges-for-uncove…
Browse files Browse the repository at this point in the history
…rd-branches

Add red badges for uncovered branches
  • Loading branch information
chiefpansancolt authored Nov 22, 2023
2 parents 661eeb0 + 5250df3 commit f411d8d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion views/dialog.erb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
<% end %>
<% if branchable_result? %>
<% file.branches_for_line(line.number).each do |branch_type, hit_count| %>
<span class="inline-flex items-center ml-1 px-2.5 py-0.5 rounded-full text-xs font-medium leading-4 bg-blue-700 text-white float-right" title="<%= branch_type %> branch hit <%= hit_count %> times">
<% color = hit_count > 0 ? "bg-blue-700 text-white" : "bg-red-500 text-slate-100" %>
<span class="inline-flex items-center ml-1 px-2.5 py-0.5 rounded-full text-xs font-medium leading-4 float-right <%= color %>" title="<%= branch_type %> branch hit <%= hit_count %> times">
<%= branch_type %>: <%= hit_count %>
</span>
<% end %>
Expand Down
2 changes: 1 addition & 1 deletion views/file_detail.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<%= format_number(file.lines.count) %>
</p>
<p class="mt-2 flex items-center text-sm lg:mt-0 lg:ml-6">
<span class="font-bold pr-2">Relevent Lines:</span>
<span class="font-bold pr-2">Relevant Lines:</span>
<%= format_number(file.covered_lines.count + file.missed_lines.count) %>
</p>
<p class="mt-2 flex items-center text-sm lg:mt-0 lg:ml-6">
Expand Down

0 comments on commit f411d8d

Please sign in to comment.