Skip to content

Latest commit

 

History

History
31 lines (25 loc) · 1.19 KB

README.md

File metadata and controls

31 lines (25 loc) · 1.19 KB

Usus.NET Build status

This Visual Studio extension provides static code analysis for software developed with .NET. Usus.NET VSIX

The analysis can also be performed in code.

//var metrics = Analyze.PortableExecutables(assemblyToAnalyze);
var metrics = Analyze.Me();
foreach (var method in metrics.Methods)
{
	Console.WriteLine("Signature: " + method.Signature);
	Console.WriteLine("CC: " + method.CyclomaticComplexity);
}

The result of the analysis can be rated and filtered for hotspots.

RatedMetrics rated = metrics.Rate();
double acd = rated.AverageComponentDependency;
int cyclicNamespaces = rated.NamespacesWithCyclicDependencies;

MetricsHotspots hotspots = metrics.Hotspots();
var complicatedMethods = hotspots.OfCyclomaticComplexity();
var bigClasses = hotspots.OfClassSizeOver(10);

Usus.NET works with Visual Studio 2010 and Visual Studio 2012. The source code and binaries are different and separate for those versions. The Visual Studio SDK is needed to compile both versions of Usus.NET.