Fix calculation of branch coverage when a class has no branches.#40
Fix calculation of branch coverage when a class has no branches.#40marklarr merged 5 commits intoSlatherOrg:masterfrom jkrumow:master
Conversation
|
Thanks @tarbrain! I'll have a look at this soon. |
|
According to Cobertura's metrics and implementation a file without lines / branches will have a rate of 1.0 (100%): https://github.com/cobertura/cobertura/blob/master/cobertura/src/main/java/net/sourceforge/cobertura/coveragedata/CoverageDataContainer.java (lines 115 , 160) https://github.com/cobertura/cobertura/blob/master/cobertura/src/main/java/net/sourceforge/cobertura/coveragedata/ClassData.java (lines 164, 220) I've made the changes only in |
CHANGELOG.md
Outdated
There was a problem hiding this comment.
The gem's current version is 1.5.3, I think we want to move these changes to the next release?
|
Cool! Sorry for the wait, @tarbrain |
Fix calculation of branch coverage when a class has no branches.
Branch-rate should be 1.0 when a class has no branches since there is only one code path which can be taken.
Something I have noticed lately.
Cheers
tarbrain