sinkcup / coverage-badge

create badge from test coverage reports
https://www.npmjs.com/package/test-coverage-badge
MIT License
0 stars 0 forks source link

取整规则:四舍五入 还是 向下 #6

Open sinkcup opened 2 years ago

sinkcup commented 2 years ago

99.99% 和 100% 不一样,所以我认为不能用「四舍五入」,而用「向下取整」,变成 99%

然后发现 codecov 把 90.77 变成了 91

codecov

https://app.codecov.io/gh/laravel-fans/laravel-ui-socialite

sinkcup commented 2 years ago

发现 jacoco 把 61.53 变成了 61,而且不采用 行覆盖率 而是 instruction

https://www.eclemma.org/jacoco/trunk/doc/counters.html

image

sinkcup commented 2 years ago

codecov 官方文档说是 向下舍去,不对吧?

https://docs.codecov.com/docs/coverage-configuration