Deriving Cyclomatic Complexity in .NET
问题 I know that I can access the cyclomatic complexity to my code in Visual Studio 2008 Team Explorer by right clicking and selecting "Calculate Code Metrics". I would like to expose this data for a web application to display it. Does anybody know of any way of accessing this data through an API? Thanks for your help! 回答1: I use NDepend for stuff like that. You can create CQL queries in NDepend and execute them. Example: SELECT METHODS WHERE CC > 8 returns the methods with a cyclomatic complexity