Cake Addin that extends Cake with the ability to use Visual Studio's metrics.exe
C# PowerShell
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Example
Source
docs/input
nuspec/nuget
tools
.appveyor.yml
.gitattributes
.gitignore
GitReleaseManager.yaml
LICENSE
README.md
build.ps1
config.wyam
setup.cake
vsMetricsTest.cake

README.md

Cake.VsMetrics

Cake.VsMetrics is an Addin for Cake which can calculate code metrics using Visual Studio's metrics.exe tool.

Usage

Download and install the Metrics Powertool (this link is for Visual Studio 2015).

Include the Addin in your cake build script:

#addin "Cake.VsMetrics"

Or NuGet reference:

#addin "nuget:https://www.nuget.org/api/v2?package=Cake.VsMetrics"

Afterwards you can start to use the Addin like this:

var projects = GetFiles("bin/Debug/*.dll");
VsMetrics(projects, "metrics_result.xml");

Or like this using VsMetricsSettings:

var projects = GetFiles("bin/Debug/*.dll");
var settings = new VsMetricsSettings()
{
    SuccessFile = true,
    IgnoreGeneratedCode = true
};

VsMetrics(projects, "metrics_result.xml", settings);

The settings object can also be used to specify the metrics.exe version:

var settings = new VsMetricsSettings()
{
    ToolVersion = VsMetricsToolVersion.VS2015
};

License

MIT