karma-runner / karma-coverage

A Karma plugin. Generate code coverage.
MIT License
768 stars 247 forks source link

Allow custom base directories for coverage reports #231

Open Nevon opened 8 years ago

Nevon commented 8 years ago

Sonarqube expects the coverage reports to have relative paths, so the absolute paths used in the lcov reporter doesn't work. Even if Sonarqube was okay with absolute paths, I'm running it in docker, so the path wouldn't match the coverage report anyway. I would suggest exposing a new configuration option for the reporter to allow you to specify your own base path. If it's not set, you could keep using absolute paths, so as to avoid breakage.

It looks like #106 may have solved it, but it was closed due to inactivity.

bgraber47 commented 7 years ago

Having the same issue, the absolute path of the lcov display 0 coverage in sonar. I was forced to use 0.4.2.