Bachmann1234 / diff_cover

Automatically find diff lines that need test coverage.
Apache License 2.0
705 stars 190 forks source link

why coverage report total line different git? #254

Open FlyHuss opened 3 years ago

FlyHuss commented 3 years ago

diff-cover report:
Total: 197 lines. Missing: 104 lines. Coverage: 47%.

but git review is +567 -23

exec: diff-cover coverage.xml --compare-branch origin/master --html-report report.html

Bachmann1234 commented 3 years ago

This is really not possible for me to answer without a repo and the report to look at.

I will say there are plenty of potential reasons.

The most likely thing is that there are lines in the diff that are simply not in the report. Either they were not collected by the coverage tool.... or they were not relevant (for example editing config files or templates).

Its possible there is a bug here but there is not enough information here for me to prove or disprove that possibility.