Deriving Cyclomatic Complexity in .NET

后端 未结 4 1754
闹比i
闹比i 2021-01-13 03:09

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

4条回答
  •  误落风尘
    2021-01-13 03:51

    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 greater than 8.

提交回复
热议问题