NDepend 3.0 Is Integrated with Visual Studio
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
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.