Merging of partially hit lines in separate reports #538
-
I'm working on implementing compile time code coverage for macros in Crystal using the custom codecov format. This is so far working out quite well, however one question I have is how are partially hit lines merged? For example say you have code like, keeping in mind this is compile time logic: {{ some_conditional ? 1 : raise "Oh noes" }} In the case of the truthy path it would be reported as How would codecov handle this? There's not really a way for it to know what branch the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
That's a good question. Offhand, I'm not sure how we would be able to confidently say anything other then Does Crystal have a native report format, or are you building the coverage instrumentator and reporter yourself? |
Beta Was this translation helpful? Give feedback.
The closest I can think of right now, would be try and output to a forward where you can tell Codecov that a partial should be counted as a hit https://docs.codecov.com/docs/codecovyml-reference#parsers
That would be more work then Codecov's custom format, but it would be more flexible. Otherwise you may have to do the merging yourself since you would in theory know it's different branches.
Similer to https://coverage.readthedocs.io/en/latest/cmd.html#cmd-combine