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
2
votes
1 answer

Add old analysis to NDepend and specify date

I've inherited a legacy project and have been working on improving the code this last year. To see my evolution, I've bought an NDepend license and started using it with success. But I would like to see how I've been doing since I started…
Peter
  • 13,733
  • 11
  • 75
  • 122
2
votes
2 answers

Is it possible to use NDepend to find class partitioning in an OOP language?

Fort first let me better explain the context and the problem. Context We have a big class with dozen of methods; it violates many Software Engineering principles and this is clearly visible through a code metrics measure tool. See poor cohesion, too…
Revious
  • 7,816
  • 31
  • 98
  • 147
2
votes
1 answer

ndepend - Unresolved .NET assembly

I get below error for some of my libraries. Error! Unresolved .NET Assembly Can't find the .NET assembly {x} in specified folders. Has it been compiled properly? Is the NDepend project missing the containing folder of the .NET assembly? I…
mechanicum
  • 699
  • 3
  • 14
  • 25
2
votes
1 answer

Security implication of prefixing type name with parent namespace name

NDepend, automatically suggests avoid prefixing type name with parent namespace name Is this due to security/threats possible?
DL Narasimhan
  • 731
  • 9
  • 25
2
votes
4 answers

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…
Lance Fisher
  • 25,684
  • 22
  • 96
  • 122
2
votes
1 answer

"Can't find the .NET assembly {AssemblyName} in specified folders"

I am simply trying to load sln files in to Visual NDepend and keep getting this error: Can't find the .NET assembly {AssemblyName} in specified folders. Has it been compiled properly? Is the NDepend project missing the containing folder of the .NET…
jshaf
  • 309
  • 1
  • 18
2
votes
1 answer

How to use NDepend to split a shared assembly?

I am working on splitting up a repo among multiple, mostly separate sub-projects. There is one large project that all the projects reference. I am looking for a way to get a list of classes in the shared project that are only used in one of the…
Erick T
  • 7,009
  • 9
  • 50
  • 85
2
votes
1 answer

Getting NDepend to recurse through an input directory finding all assemblies/source across multiple projects

I am using a NAnt build script to call NDepend with the required command line arguments.
tomahawk
  • 249
  • 2
  • 9
2
votes
1 answer

Exposing CQL Result in NDepend

I have some custom CQLs in NDepend Project and I want generate the results of these CQLs using NDepend.Console.exe. When I generate the report, I don't see any result of my custom CQLs in the report. I can export from Visual NDepend but I want to…
Ant
  • 3,369
  • 5
  • 25
  • 23
2
votes
1 answer

Finding Types that implement specific Methods using CQL

I'm refining the built in dead code query in NDEpend and I'm finding a lot of false positives from standalone programs (i.e. w/ Main() entrypoints). I noticed that the built in unused types query has this clause: !NameIs "Program" AND //…
Yostage
  • 292
  • 2
  • 4
  • 12
2
votes
1 answer

How to use CQLinq to get metrics of Methods and Fields within a single query

I am calculating average length of identifiers with CQLinq in NDepend, and I want to get the length of the names of classes, fields and methods. I walked through this page of CQlinq: http://www.ndepend.com/docs/cqlinq-syntax, and I have code…
VincentZHANG
  • 757
  • 1
  • 13
  • 31
2
votes
1 answer

Using NDepend to find out places where specific objec types are placed in System.Web.Caching.Cache

I'm trying to search a rather large codebase for methods where Large objects are ending up being used in any of the System.Web.Caching.Cache methods. These type can sometimes be so big that they end up on the Large Object Heap which in turn is a bad…
orelob
  • 55
  • 3
2
votes
1 answer

Can CQLinq code be reused in multiple queries?

Let's say I'm analyzing a solution which contains a lot of Controls, e.g. public class FooControl : IControlBase { public void EvilMethod1() { // does some warning-level evil here } public void EvilMethod2() { //…
2v0mjdrl
  • 582
  • 4
  • 19
2
votes
1 answer

How do I programatically create an NDepend project file?

To start, this may be a useful link: http://www.ndepend.com/NDependConsole.aspx As anyone who has used Visual NDepend may know, with NDepends you need to import project / solution files, and the corresponding output directories, namespaces, and…
Stefan Valianu
  • 1,370
  • 2
  • 13
  • 24
2
votes
0 answers

Query when a type is created with CQLinq

Let's say i have the follwoing code: public abstract class MyBase { } public class MyImplementation : MyBase { } public class MyService1 { MyImplementation myi = new MyImplementation(); } public class MyService2 { public void Foo() { …
gsharp
  • 27,557
  • 22
  • 88
  • 134