NDepend 4.0 Released

Posted by Anthony Trudeau on Geeks with Blogs See other posts from Geeks with Blogs or by Anthony Trudeau
Published on Sun, 27 May 2012 20:03:27 GMT Indexed on 2012/05/30 16:43 UTC
Read the original article Hit count: 309

Filed under:

Last week version 4.0 of NDepend was released.  NDepend is a Visual Studio add-in designed for intense code analysis with the goal of high quality code.  A month ago I wrapped up my evaluation of the previous version of NDepend.

The new version contains many minor changes, several bug fixes, and adds about 50 new code rules.  The version also adds support for Visual Studio 11, .NET Framework 4.5, and SilverLight 5.0.  But, the biggest change was the shift from CQL to CQLinq.

Introducing CQLinq

The latest version replaces the CQL rules language with CQLinq (CQL is still an option although the editor is buried).  As you might guess CQLinq is a flavor of Linq designed specifically for the code rules.

The best way to illustrate the differences is with an example.  I used the following CQL example in Part 3 of my review:

WARN IF Count > 0 IN
SELECT TYPES
WHERE IsInterface AND !NameLike “I”

This same query looks like this when implemented in CQLinq:

warnif count > 0 from t in Types
where t.IsInterface == true && !t.NameLike(“I”)
select t

I like the syntax and it is a natural fit, but I found writing the queries frustrating in the Queries and Rules Edit window.  The Queries and Rules Edit window replaces the CQL Query Edit window.  The new editor has the same style of Intellisense as the previous editor.  However, it has a few annoyances.  The error indicator is a red block.  It has the tendency of obscuring your cursor.  Additionally, writing CQLing queries is like writing plain old Linq queries, so the fact that the editor uses Enter to select from Intellisense instead of Tab is jarring.  These issues can be an obstacle to writing queries quickly.

CQLinq makes it possible to write rules that weren't possible before.  Additionally, a JustMyCode domain is now possible making it easy to eliminate generated code from the analysis.

Should you Buy?

I recommend NDepend overall.  It has some rough points for me that I have detailed in my earlier evaluation (starting here).  But, it’s definitely worth the money.  The bigger question is: should I pay for the upgrade to 4.0?  At this point I’m on the fence, but I would go for it if you need support for Visual Studio 2011, .NET Framework 4.5, or Silverlight 5.0; or if you need one of the many rules that weren't possible before CQLinq.

Disclaimer: Patrick Smacchia contacted me about reviewing NDepend. I received a free license in return for sharing my experiences and talking about the capabilities of the add-in on this site. There is no expectation of a positive review elicited from the author of NDepend.

Resources:
NDepend Release Notes

© Geeks with Blogs or respective owner