We're building a new ASP.NET 5 application (currently using RC1) which also has some ASP.NET 5 class library projects attached to it. Looks like the Analyze tool in Visual Studio 2015 doesn't support the new code.
We really want to be able to run some basic analysis e.g. cyclomatic complexity, maintainability, etc. What can we use to analyze our code?
Have you tried NDepend? It is a commercial .NET code analyzer integrated in Visual Studio. A full-featured 14-day-trial is available for download.
It has built-in support for cyclomatic complexity, proposes many default rules, and lets edit custom code rules as C# LINQ query.
Hence if you want a code rule that checks that you have no method with a cyclomatic complexity higher than 15 for example, you can create it as:
// <Name>Methods too complex</Name>
warnif count > 0
from m in JustMyCode.Methods
where m.CyclomaticComplexity > 15
select new { m, m.CyclomaticComplexity }
Disclaimer: I work for NDepend
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With