Questions tagged [ndepend]

NDepend is a static analysis tool for .NET managed code that focuses on code dependencies and quality.

NDepend is a static analysis tool for .NET managed code that provides extensive code metrics and dependency visualization using directed graphs and a dependency matrix. It also validates code architecture, design, and quality rules, integrates test-coverage analysis, and enables trend monitoring through codebase snapshot comparisons.

NDepend comes with many predefined code rules that users can supplement with custom rules written in Code Query Language (CQL). CQL is very similar to SQL, making codebase queries much like querying a relational database. The tool can also automatically check code rules during continuous integration.

References:

286 questions
4
votes
1 answer

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…
Xian
  • 76,121
  • 12
  • 43
  • 49
4
votes
1 answer

Only keep used types and remove unused types

Is there any way to remove unused types/code from a project. lets say I'm using NAudio(source code) in my console application and I'm only using the WaveIn class from it. Is there any way for me to remove unused classes from the code and only keep…
Abdullah Saleem
  • 3,701
  • 1
  • 19
  • 30
4
votes
1 answer

NDepend and Dependency Injection - how to connect the dots?

Please, observe the following trivial program using MEF as the Dependency Injection framework: using System.ComponentModel.Composition; using System.ComponentModel.Composition.Hosting; namespace ConsoleApplication2 { [InheritedExport] …
mark
  • 59,016
  • 79
  • 296
  • 580
4
votes
1 answer

How to view Code Metrics lke Fan-In/Fan-Out with NDepend

I have installed NDepend (14-day trial version) as a Visual Studio 2015 Extension, and it works now. I would like to get some metrics of some classes in my solution: length of identifiers fan in / fan out weighted method of class coupling of class…
VincentZHANG
  • 757
  • 1
  • 13
  • 31
4
votes
4 answers

Determine Unused Methods and Properties

I have a self-contained solution (non of the DLLs are used in any other project, so no worrying about Methods being used somewhere else). I'm trying to figure out a way to determine every method/property that is not in use at all. So I can't just…
Brett Allen
  • 5,297
  • 5
  • 32
  • 62
4
votes
1 answer

ndepend; get method's arguments

How can I, using CQLINQ, get collection of input arguments for current method? There is any collection like "Arguments" or "Parameters" only "NbParamenter" which is not suitable for my purposes.
3
votes
1 answer

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…
NotMyself
  • 29,209
  • 17
  • 56
  • 74
3
votes
1 answer

Seeing Trends in Code Metrics with NDepend

I have a version of NDepend for build servers and have automated the NDepend report generation. So, every night the build does its thing and NDepend reports/XML are generated. What I now want to do is track some metrics as a function of time. So,…
Erik Dietrich
  • 6,080
  • 6
  • 26
  • 37
3
votes
1 answer

Detached/attached NDepend windows in Visual Studio not remembering where they should be

NDepend is a great tool, but I'm having problems with the various windows opened by NDepend in Visual Studio 2010. The don't seem to remember where I stick/attach them. I want the Error List and Query Explorer to be stuck at the bottom, and the CQL…
Johan Danforth
  • 4,469
  • 6
  • 37
  • 36
3
votes
1 answer

In Ndepend dependency matrix, how can I hide some row assemblies?

I'd like to hide some of the row assemblies in my dependency matrix so that I can spot quickly the dependencies between assemblies of my project and a subset of 3rd party assemblies.
sthiers
  • 3,489
  • 5
  • 34
  • 47
3
votes
2 answers

How to set up dependency rules?

I want to set up some new dependency rules for a repo which has multiple solutions and assemblies. Rule should be, such as:- in any project, all the assemblies of type .ABC. should not depend upon .XYZ.. Any violation of such rule should be caught…
3
votes
1 answer

CQL request composition

Is it possible to compose requests in CQL ? I would like to write something like: SELECT TYPES FROM ASSEMBLIES "myassemblie" WHERE IsUsing SELECT METHODS FROM ASSEMBLIES "myotherassemblie" WHERE IsStatic Thanks, Vans
vans
  • 73
  • 5
3
votes
1 answer

Open an NDepend Project With An Automated Team Build?

I am trying to automatically open an NDepend Project when the Solution builds in an automated build in TFS2010. This stems from this previous question. The aforementioned post is where I tried (and failed) to integrate NDepend's code metrics…
AmbiguousX
  • 1,704
  • 4
  • 24
  • 39
3
votes
1 answer

nDepend integration in Visual Studio 2010

This stems from a previous question I asked regarding code metrics. I have been trying out nDepend as a tool to use in running metrics on our team's code. I have to say that so far I am very impressed with the design, information given, etc. My…
AmbiguousX
  • 1,704
  • 4
  • 24
  • 39
3
votes
1 answer

CQL in ndepend and cppdepend to see changes in metrics across revisions

CQL makes it easy to find methods where CodeWasChanged but I also need to compare the metrics - I want to find modified code and see if it has improved or not. I'm evaluating ndepend and cppdepend for a mixed code base. I'm very impressed with both,…
Andy Dent
  • 17,578
  • 6
  • 88
  • 115
1 2
3
19 20