Open migheorghe opened 1 year ago
@migheorghe It's overwriting the original files, prepending the path over and over with the --prepend-source-files
arg.
I'm using it as a yarn bin
instead of a yarn script
, and it's the only way it works, for some reason.
yarn coverage && yarn lcov-result-merger **/coverage/lcov.info lcov.info --prepend-source-files
There should be some kind of pwd
bug, when it can't switch to the root folder of a monorepo.
I migh refactor this project a bit, and provide a bit more decent replacement, in the future.
@mdeanjones any idea here?
Nothing at present @mweibel. I'll be closing out some other work in the next couple of weeks, and plan on digging into this.
@yuriy-yarosh refactors are welcome! There's a lot that I've been eyeing too.
Following up on this @migheorghe. v5.0.0-rc.0
has just been released which may contain a fix for the problem that you are experiencing. Prior versions were creating a temp file named lcov.info
in the working directory that might be clobbering things for you.
With this release, that temp file is being created in the OS' temp space, so it should never collide.
I think that we can move even further and eliminate using temp files altogether... more refactors incoming.
I seem to be still experiencing this on 5.0.0.
Tbh, I don't seem to be able to make any combination of versions/commands/options work. The files are picked up, but lines, functions and branches are all 0/0.
@carboni-rob, would you be able to create a minimal reproduction of your issue, or furnish a sample file that is failing to be read?
Initial thoughts:
Happy holidays!
For some reasone version 4 does not output anything when run like bellow: V4.0.0 - npx lcov-result-merger "C:\temp\CodeCoverage**\lcov.info" "C:\Temp\CodeCoverage\lcov.info"
version 3.3.0 works as expected npx lcov-result-merger@3.3.0 "C:\temp\CodeCoverage**\lcov.info" "C:\Temp\CodeCoverage\lcov.info"