coverage icon indicating copy to clipboard operation
coverage copied to clipboard

Automatically detect non-git version control roots

Open trezona-lecomte opened this issue 9 years ago • 3 comments

Currently we will automatically detect the project root if the project uses git, however for any other version control root the user will have to manually customise the coverage-dir.

trezona-lecomte avatar Feb 19 '16 23:02 trezona-lecomte

What about just walking the directories upwards from the source file until you find the right .json coverage-data file? That would work with any version-control system, and with repositories that (for whatever reason) have projects in a subdirectory of the VC root.

I wrote a similar elisp tool for doing python coverage annotations years ago, and that's the approach it uses. (I'm working on a patch to merge my code into yours, if you're interested.)

warner avatar Feb 21 '16 21:02 warner

Hey, that's sounds like a nicer solution. A PR from your existing tool would be great! I'm about to release an update that uses the timestamp in the result file to avoid parsing the entire JSON result-set needlessly, as I've noticed slowdown on larger projects. Hopefully this change doesn't conflict too much with your merge.

trezona-lecomte avatar Feb 21 '16 21:02 trezona-lecomte

My work on using the timestamp to try and improve performance is on this branch, in case your interested.

trezona-lecomte avatar Feb 22 '16 09:02 trezona-lecomte