BT
x Your opinion matters! Please fill in the InfoQ Survey about your reading habits!

NDepend 3.0 Is Integrated with Visual Studio

by Abel Avram on Feb 04, 2010 |

NDepend 3.0 comes integrated with Visual Studio analyzing code in real time, can analyze code over multiple VS solutions, supports editing of multiple CQL rules at one time, and comes with enhanced search and performance.

Some of the new features coming in NDepend 3.0 are:

  • Integration with Visual Studio - The main feature coming with NDepend 3.0 is deep integration with Visual Studio including access from Solution Explorer or Code Editor’s context menus to NDepend commands. Until now NDepend could be used to analyze code during build, but now analysis runs in background while developing, in Visual Studio, informing the user if there are any CQL rules violated. NDepend 3.0 is integrated with Visual Studio 2005, 2008 and 2010 SLCTP3 and RC1.
  • Performing analysis over multiple VS solutions -  NDepend 3.0 can analyze code belonging to different VS projects or  solutions.
  • Enhanced integrated in VS search – Besides being integrated with VS, the search can be used to find items based on many criteria: name, regex, code metrics, visibility, purity, changes, and others. Search can also span multiple VS solutions.
  • Support for editing multiple CQL rules at a time – While before one could edit one CQL rule at a time then check for validity, now he can edit multiple rules.
  • Integration of Dependency Matrix, Dependency Graph and Metric View with VS – the dependency matrix and graph have been integrated with VS so one won’t have to leave the development environment to visualize the dependencies in his code.
  • Better performance due to the use of incremental analysis – Analysis is done asynchronously in a low priority thread and the authors claim NDepend can validate hundreds of rules in 2-5 seconds. Validation can be done during each compilation or at determined time intervals.

The complete list of new features is included in the Release Notes.

NDepend is a .NET software analysis tool. It can be used to discover code dependencies in a project, for snapshots comparison, or validating projects against code quality rules. These rules cover over 80 code related metrics in several domains like: Dependencies, Quality, Evolution, Purity / Side-Effects / Immutability, Encapsulation, and others.

The rules are created with Code Query Language (CQL), a language similar to SQL but querying code not databases. Some CQL query examples are:

//Select all public methods with more than 30 lines of code
SELECT METHODS WHERE NbLinesOfCode > 30 AND IsPublic
//Select refactored methods that are not covered by tests
SELECT METHODS WHERE CodeWasChanged AND PercentageCoverage < 100
//Select top 10 most complex methods
SELECT TOP 10 METHODS ORDER BY CyclomaticComplexity

Rules can be created by hand or visually with VisualNDepend. The latest CQL Specification is 1.8 and it is supported by NDepend 2.9 or later.

NDepend 3.0 is to be released this month, and two beta versions are available for test: Professional, which needs a Pro 2.x license, and Trial, which is free. 

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT