Skip to content
This repository was archived by the owner on Jun 18, 2026. It is now read-only.

Add ability to support branch coverage statistics ruby >= 2.5 - #64

Merged
PragTob merged 3 commits into
simplecov-ruby:masterfrom
som4ik:feature/branches-coverage-support
Dec 5, 2019
Merged

PragTob merged 3 commits into
simplecov-ruby:masterfrom
som4ik:feature/branches-coverage-support

Conversation

@som4ik

@som4ik som4ik commented Aug 17, 2018

Copy link
Copy Markdown
Contributor

Show statistics of branch coverage result.
branch1
all_files
You can put this merge on pending until they merge simplecov gem branch that generates needed statistics. Anyway, these modifications are not harmful.

background-color: #FBF0C0
&:nth-child(even)
background-color: #FBFfCf No newline at end of file
background-color: #FBFfCf

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about using lowercase values for all colors in this file for consistency?

Comment thread lib/simplecov-html.rb
# Check if branchable results supported or not
# Try used here to escape exceptions
def branchable_result?
defined?(SimpleCov::branchable_report) ? SimpleCov::branchable_report : false

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not clear to me what SimpleCov::branchable_report refers to? Should it be SimpleCov.branchable_report?

Comment thread lib/simplecov-html.rb

def line_status?(source_file, line)
if branchable_result? && source_file.line_with_missed_branch?(line.number)
"missed-branch"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure it matters, but this could be made into a constant / frozen string.

Comment thread views/source_file.erb Outdated

<% if branchable_result? %>
<h4>
<span class="<%= coverage_css_class(source_file.branches_coverage_precent) %>">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: percent

@PragTob

PragTob commented Dec 4, 2019

Copy link
Copy Markdown
Collaborator

Ugh all the CI failing is my/our fault... need to fix that up. Sorry.

@som4ik
som4ik force-pushed the feature/branches-coverage-support branch from a6e72e6 to 331679d Compare December 4, 2019 10:38
@som4ik

som4ik commented Dec 4, 2019

Copy link
Copy Markdown
Contributor Author

@PragTob I updated the branch, hope it will fix CI, else I will try to have a look this evening!

@som4ik
som4ik force-pushed the feature/branches-coverage-support branch from 331679d to cf09ef2 Compare December 4, 2019 13:59
@som4ik

som4ik commented Dec 4, 2019

Copy link
Copy Markdown
Contributor Author

Ugh all the CI failing is my/our fault... need to fix that up. Sorry.
.travis.yml updated according to the release https://github.com/colszowka/simplecov/releases/tag/v0.17.0

@PragTob

PragTob commented Dec 4, 2019

Copy link
Copy Markdown
Collaborator

Ah wanted to fix that up on a separate branch, small changes, fix it for everyone and not tie it to this branch and such... but thank you still, I'll do further fixing after this landed which will hopefully be soon :D

@PragTob
PragTob merged commit 3546b22 into simplecov-ruby:master Dec 5, 2019
@PragTob PragTob mentioned this pull request Dec 5, 2019
16 of 17 tasks
@amatsuda

amatsuda commented Dec 5, 2019

Copy link
Copy Markdown
Member

🎉

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants