Closed lylex closed 6 years ago
Well, this is the classical behavior: you expect to have 100% coverage when both a.go and b.go are covered by tests.
Or did I miss something?
Would you like to exclude some files from coverage computation?
@danielleberre Sorry for the confusion, let me explain a little bit more with an example.
Assume we have the following folder:
ok, I see.
When files are tested, we rely on the coverage file to detect "executable lines", so that information is correct.
When files are not tested, we simply report the number of lines, we do not restrict to executable lines.
@thibaultfalque any idea how to count the number of executable lines in untested files?
63947781319a4a533c734ceefe8bfa1197e9972a
We improved the calculation of untested lines. We will publish a release soon.
@lylex could you test with the last release ?
@thibaultfalque I have tried the new release with my project, and I still find something unexpected. I believe that is not the same root cause, so I verify this issue and open #61.
Description
A not-tested source file will over-decrease the code coverage, even if the definitions are all calculated.
Steps to Reproduce
Versions
Versions of your sonar installation (server, sonar-scanner), gometalinter, go and OS.
Sonar Server: 6.5(build 27846) Sonar-golang Plugin: 1.2.11-rc10 GO: go1.9.2