Less prerequisites for instrumentation
ffMathy opened this issue ยท 11 comments
Continuing on the premise and use-case described in #136, I noticed that the following options seem required (from the documentation):
sources
tests
But why are these required? What are they used for? I don't currently need to specify it when using AltCover, and I'd like to move away from it and over to Minicover instead.
Is it possible to infer these values? AltCover must be doing the same somehow.
So to summarize all my questions:
- Why are these required?
- What are they used for?
- Can we infer them instead?
The dilemma is that the users of my Pruner CLI shouldn't need to specify these things if it can be avoided. Today, it just needs a directory pointing to your project or solution, and it'll run dotnet test
from that, along with AltCover instrumentation etc.
It'd be great if this could somehow do the same.
@lucaslorentz investigating further, it seems AltCover just checks if the source file for a given assembly exists on disk, and then assumes instrumentation is needed.
That would be a very cool default if none of the other options were specified, or at least make it possible if using Minicover.Core
. Once that's solved, I can start using the project!
Makes sense, I will make MiniCover.Core more flexible regarding that
Probably later I will improve the tool experience as well.
Great! Any ETA on this? Can't wait! ๐
As a temporary workaround, you can create a class extending InstrumentationContext, override IsSourceFile and do a File.Exists inside it.
Something similar for IsTestFile, if you have any way of knowing if the file is a test file or not.
But will that be enough?
Aren't those arguments used implicitly somewhere else too?
No, they're not.
Can you please review? #138
Wow, already! Thank you so much ๐
I left a comment!
Also, do you want to connect perhaps? Maybe on Discord or Skype?
I think we may have a very similar coding style, and it looks like we both like Open Source ๐
Sounds good, I'm completely new to discord. Created this server for minicover: https://discord.gg/WqBBjnZcCe
I will learn as we go