mweibel / lcov-result-merger

Merges multiple lcov results into one
MIT License
100 stars 22 forks source link

Merge policy #41

Open merlosy opened 6 years ago

merlosy commented 6 years ago

Hi, I'd like to use this but the merge policy is not what i'd need. Could it be possible to customize the merge "policy"? Instead of adding up the values, i'd like to pick the suite with the best result when the same file is tested. This could be an argument when running the script: policy=sum or policy=best

What do you think?

mweibel commented 6 years ago

That's probably requiring a bigger refactoring (but that might be required anyway for not repeating the code all the time if we'd want to implement parsing of more sections). I don't really have time to work on this, but if you have I'd be happy to review. Would be nice to have smaller PRs in order to ensure fast reviews though :)

merlosy commented 6 years ago

Just spent the day doing this: https://gist.github.com/merlosy/55b7f974ca2116203c6cee4e6676068f This seems to do the job.. The implementation is a bit different, no dependencies, es6...

PieterLeRoux177 commented 6 years ago

@merlosy Are you going to create a pull request for the fix? I need exactly what you did here.

merlosy commented 6 years ago

@PieterLeRoux177 What i did is a full rewrite.. Not really eligible for a PR then. As @mweibel mentioned, it would be a lot of work to review, especially since I didn't implement any test. I'm not even sure all the features provided in this repo are in my solution. Anyway, if you want to use my solution, you can simply copy/paste from the gist (link above)