Extract common Library to enable consumption from other tools
See original GitHub issueI want to write a Cake addin for MiniCover like the one that exists for OpenCover. I cannot easily instruct users to add MiniCover as a tool as the way cake downloads tools from Nuget is not compatible with the DotnetCliTool
package type. I could tell users to create a tools project as instructed in the README and pass that to my addin, but I think an easier solution is if we separate the actual instrumentation and reporting logic from the dotnet cli tool frontend. This would allow me to reference it as a dependency in my package and enable users to get simple coverage with something like:
#addin "Cake.MiniCover"
// ...
Task("Coverage")
.IsDependentOn("build")
.Does(() =>
{
MiniCover(tool =>
{
foreach(var project in GetFiles("./test/**/*.csproj"))
{
tool.DotNetCoreTest(project.FullPath, new DotNetCoreTestSettings()
{
// Required to keep instrumentation added by MiniCover
NoBuild = true,
Configuration = configuration
});
}
},
new MiniCoverSettings()
.WithAssembliesMatching("./test/**/*.dll")
.WithSourcesMatching("./src/**/*.cs")
.GenerateReport(ReportType.CONSOLE | ReportType.XML)
);
});
// ...
Then, generating coverage becomes as simple as
./build.sh -t Coverage
# Or on Windows:
./build.ps1 -t Coverage
Issue Analytics
- State:
- Created 6 years ago
- Comments:20 (11 by maintainers)
Top Results From Across the Web
The Java Library Plugin
A library is a Java component meant to be consumed by other components. It's a very common use case in multi-project builds, but...
Read more >Work with Azure Functions Core Tools
Core Tools lets you create function app projects for the .NET runtime as either in-process or isolated worker process C# class library projects ......
Read more >20 Must-Have Python Libraries for Data Science in 2023
Discover the top Python libraries for Data Science, including TensorFlow, SciPy, NumPy, Pandas, Matplotlib, Keras, and more.
Read more >Getting Started | Consuming a RESTful Web Service
This guide walks you through the process of creating an application that consumes a RESTful web service. What You Will Build. You will...
Read more >Database Export Tool - CSM - Cherwell Help
Use the Export Data option in CSM Administrator to export a selected CSM Database to a compressed Cherwell Archive Repository (.czar) file.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
Top Related Hashnode Post
No results found
Top GitHub Comments
I love it! 😍
@nlowe Looks really good. @lucaslorentz do you plan to create a project on github? That would be nice to have kanban with tasks. Maybe the common board with Cake.MiniCover (@nlowe)?