ndepend

How to start using ndepend?

I recently downloaded ndepend and ran an analysis on an open source project I participate in. I did not now where to look next - a bit of visual and information overload and it turned out I don't even know where to start. Can anyone suggest starting points? What information should I look for first? What points out problems in the cod...

NDepend CQL Count Query

I want to query a table of public methods of a specific class and a count of each methods usage in NDepend CQL. Currently query looks like this: SELECT METHODS FROM TYPES "AE.DataAccess.DBHelper" WHERE IsPublic Is it possible to aggregate queries in CQL? ...

How do I automatically fail a nant build if NDepend query raises a warning

OK first some background. I am busy automating our build process. We run a mixture of Vs 2005 and VS 2008 both targeting platform 2.0. We use Nant to do our builds using the MSBUILD task to do the compile and Cruise Control .net to do our CI. Currently we treat all warnings as errors, fail the build if any FxCop rules fail (except a s...

Finding all methods that handle form events using NDepend

Hi all, I was wondering if someone would be able to help me write a CQL query for NDepend that will show me all the methods in my form class that handle the form events. So I would like to be able to find all the methods that look like this: Private Sub AddFolderButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) ...

NDepend CQL Query for missing IDisposable implementation

I realize that the query this question is looking for won't be enough to find every little problem with IDisposable implementations, but every early warning counts, so I'll take what I can get. I'd like to know if anyone has come up with a CQL query for NDepend that will list all classes that doesn't implement IDisposable, but has one o...

FxCop rule that checks for NotImplementedExceptions

I'd like to have the nightly build check for how many NotImplementedExeptions there are in my .NET code so hopefully we can remove them all before releasing. My first thought is that FxCop might be a good tool to do this. Does anyone have a custom FxCop rule for this? How would I go about creating one myself? ...

Does any tool similar to NDepend exist for unmanaged C++ code?

I have enjoyed the power of NDepend ( http://www.ndepend.com/ ) when writing C#, but in my C++ projects I have not found a comparable tool. I use Visual Studio 2005, which has a class-view that covers some bases, but it is not powerful enough and doesn't work across project boundaries. I use Visual Assist X, which has some powerful refa...

Driving NDepend with NUnit

Is it possible to use NUnit to run CQL queries using NDepend? It would be nice to be able to just include the NDepend dlls in a UnitTests library and write tests like: [Test] public void DomainAssemblyHasNoDatabaseDependencies ... or something similar. This would make it very easy to integrate with Team City, and automatically fail ...

Most helpful NDepend CQL queries

A client I work for has begun using NDepend as a replacement for FXCop, and the "architect" has compiled a list of practically unusable CQL queries, which I gather he has taken from advice from the NDepend website. An example of what "I think" is an unhelpful query WARN IF Count > 0 IN SELECT METHODS WHERE PercentageComment < 20 AND ...

Ndepend reports not showing up in CruiseControl Dashboard

I am currently in the process of setting up ndepend report generation as part of Continuous Integration build process using CruiseControl.Net, I have followed the instructions outlined in ThoughtWorks Website. The ndepend tasks runs fine and the reports are generated correctly but when I goto the dashboard and try to bring up the ndep...

How to get the maintainability index?

Hello, I need help... How can I create the maintainability index with cql? Does the NDepend calculate this number? Thanks! Alejandra ...

How quit the Ndepend report into the Build Report?

Hello, I want to quit the Ndepend report into the Build Report, but still have the link ‘NDepend Report” in link in the left navigation. How can I do that? thanks! Alejandra ...

Do you know any alternative to NDepend for architects?

Hi! do you know any software similar to NDepend? I've got it just recently, and found it very useful. It helped me a lot, but for now i don't have a possibility to buy a proffessional version. So, is there any alternative (maybe, open-source)? Preferrably, free. But not necessarily. Maybe, with a little bit more fitting price for a si...

What is Abstractness vs. Instability Graph ?

Hi, I recently used NDepend and it produced a good report on my .net assemblies and related pdbs. The most interesting thing I found in the report was abstractness vs. instability graph. I wanted to understand this in real detail, I read their docs and online metrices but it could only help to an extent. Primarily I wish to understand...

NDepend metrics on assemblies

Do you try to keep the Distance from main sequence low for every assembly? What about assemblies that contains only Business Objects definitions? Is it possible to keep them away from Zone of Pain? Types in such assemblies are usually used by other assemblies and are rather concrete. How to handle such situation? ...

Exiting the Zone of Pain - NDepend

Hi all, I was just running one of my projects through NDepend and the report put my assembly right in the corner of the zone of pain. I was just wondering if it's something that I should be worried about. What does the zone of pain really mean? Doesn't it mean that there is a lot of coupling and things can't change very easily. I...

Code quality and analysis tools for C#? How do you analyze your code?

I am a big NDepend fan and so I read quite a bit from Patrick Smacchia. I was reading a post of his this morning regarding "Where do developers care for Software Quality" in which he looks at the NDepends site log files in Google Analytics to see where people come from to have a look at NDepend. The results are semi-interesting. Howev...

Useful ways to use CppDepend

For a while now I've seen a lot of blog posts about NDepend and how useful it can be, but I've never been able to try it as I don't work in .Net. A couple days ago I saw that a C++ version was released. Finally a version I can try. The features look cool and interesting, but I'm having trouble seeing where it would be useful. I can t...

Inherited method dependencies using NDepend

The class browser of NDepend doesn't seem to have an option for revealing inherited methods. We have a scenario where we have thousands of singly-rooted Model objects that descend from RootModel, for instance. Only RootModel defines Save(). How does one form a query for finding all instances where SampleModel (:RootModel) invokes Save()...

Resolving MSB3247 - Found conflicts between different versions of the same dependent assembly

A .NET 3.5 solution ended up with this warning when compiling with msbuild. Sometimes NDepend might help out but in this case it didn't give any further details. Like Bob I ended up having to resort to opening each assembly in ILDASM until I found the one that was referencing an older version of the dependant assembly. I did try using ...