locked
using VS 2010 for code analysis

    Question

  •  

    I am using VSTS 2010 Ultilmate and not aware as how to find the following options. If VS 2010 doesnt have it, can you pls suggest other tools which can help me in finding these details...

     

    ·        Duplication of code

    ·        % Commented Code

    ·        Number of Parameters, Number of Variables, Number of Overloaded methods.

    ·        Cohesion and Coupling

    o   No of Abstract Classes or Interfaces referred

    o   No of Interfaces Implemented.

    o   Cohesion of Methods

    Tuesday, March 20, 2012 12:43 PM

Answers

  • Duplication of Code is coming in Visual Studio 11, see this article.

    % of commented code is not available

    Number of Parameters, variables, overloads, there are a few CA rules that warn you if you really go overboard with these, but there is no simple report you can open.

    Cohesion and Coupling, coupling is part of the Visual Studio 10 Ultimate edition and can be found under the Analyze, Code Metrics menu., cohesion isn't I believe.

    No of abstract classes or interfaces, not there, there is a CA rule which will flag a warning for the number of dependencies (be it normal, abstract or interface) again when you really go overboard. No simple report you can open.

    No of interfaced implemented, not there

    Cohesion of methods, again part of the Code Metrics feature.

    If this is very important to you, then consider investing in Visual NDepend, it gives you all of these, plus a lot more. It is, however, notoriously hard to learn.


    My blog: blog.jessehouwing.nl

    Tuesday, March 20, 2012 2:59 PM