Is your feature request related to a problem? Please describe.
There is an option for run command to store only relative file paths. It is very useful while running your tests inside one environment(e.g. docker) and using results in another one(e.g. on Jenkins node). It is also common to generate cobertura report in the same environment you are running tests, but this report always includes absolute path for sources(I think, because of this line). This way it is impossible for tools like Jenkins Cobertura plugin or Sonarqube to find source files properly(Sonarqube either fails to parse coverage report at all or raises warning, for example).
Describe the solution you'd like
json reports use paths from .coverage file and thus respect this relative_files setting from run section.
It would be nice either to not canonicalize paths for sources or to have an option which will skip path normalization(this way it may be more backward compatible)
Describe alternatives you've considered
I tried to use combine and define sources in [path] section of config but it ends up with absolute path in the end report anyway.
inspired by discussion in #597
This seems very reasonable :)
Same issue here :( CodeClimate outside of docker fails as the report is using absolute path.
As of f668d6f3, using [run] relative_files=True will make the XML report store relative file names.
This is now available in coverage v5.0.4
Most helpful comment
As of f668d6f3, using
[run] relative_files=Truewill make the XML report store relative file names.