codeclimate / test-reporter

Code Climate Test Reporter
MIT License
156 stars 76 forks source link

Is the gcov formatter broken? #328

Closed pbrisbin closed 6 years ago

pbrisbin commented 6 years ago

I was considering supporting coverage reporting for Haskell by first pre-processing its native tix format to gcov, then using cc-test-reporter normally. To understand what I'd need to do, I looked at your gcov parser, it seems broken:

https://github.com/codeclimate/test-reporter/blob/master/formatters/gcov/gcov_test.go#L26

If I'm reading this correctly, it uses the gcov file name as the SourceFile name. Shouldn't it use the actual name of the source (e.g. examples/Calculator.swift in that test)?

If I'm correct, please also note you can't just s/.gcov$// to fix this, you have to read the filename out of the data itself: https://github.com/codeclimate/test-reporter/blob/master/formatters/gcov/examples/Calculator.swift.gcov#L1

wilson commented 6 years ago

Thanks, this does look like a bug we'll need to address.

ale7714 commented 6 years ago

@pbrisbin 👋 we just released v0.6.0 to address this issue. Let us know if you find any other issue 😄.