Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add red badges for uncovered branches #59

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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