aconrad / pycobertura

A code coverage diff tool for Cobertura reports
MIT License
114 stars 39 forks source link

Require More than one source file path provision for one coverage report #101

Open rohith0205 opened 4 years ago

rohith0205 commented 4 years ago

Require More than one source file path provision for one coverage.xml file.

Ex:

pycobertura diff coverage.old.xml coverage.new.xml --source1 old_source/,old_source2/,old_source3/ --source2 new_source/,new_source2/,new_source3/

aconrad commented 4 years ago

Thanks for your request @rohith0205 !

Can you update the issue description and provide more context about your use case? I've never used more than one source directory per coverage file. What would be a situation when this would occur? More background on how you get there would help me understand the workflow.

aconrad commented 2 years ago

Do the coverage files contain paths like:

<line filename="old_source/foo" hits="1">
<line filename="old_source2/foo" hits="1">
<line filename="old_source3/foo" hits="1">

Or are those meant to be additional lookup directories should the filename not be found in the first directory? If that's the case, how can we ensure that we parse the right file if it's present in 2 of the look-up paths?