coverage
coverage copied to clipboard
Automatically detect non-git version control roots
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
.
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.)
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.
My work on using the timestamp to try and improve performance is on this branch, in case your interested.