Search code examples
c#static-analysiscode-statistics

Get statistics on a C# WAP Project for client communication


I have a client that thought a highly dynamic ASP.NET application was a very simple sytem, yet to implement it in the manner in which they needed for future grown it has grown to well over 100 different code files.

I am looking for a way, most likely with some sort of static code analysis tool to put some numbers that might "make sense" to a non-technical person. I fully understand that Lines of Code and other metrics are not really "valid" items to evaluate, but in this case this is the type of thing I need, Lines of Code, Number of XML comments, Total Files, Total Folders.

I know I can look some of these up, but I'm looking for an easy way to get these values in bulk! I found a few old posts here, but nothing that specifically talked about .NET (Current versions) and/or C#.

Ideally I want something that can investigate a C# WAP project. SQL Server would be an AWESOME value add, but not a 100% needed item!


Solution

  • You can use the tool NDepend to get 82 code metrics like # of Lines of Code, # of parameters for methods, # of method callers, percentage comment for a method, percentage of code coverage by tests, ranking (most popular methods/types...).

    All 82 metrics are listed on this page http://www.ndepend.com/Metrics.aspx.

    Also, Code Metrics is just one of the major features of NDepend: