Questions tagged [cqlinq]

CQLinq is a LINQ-like query language used by NDepend to reflectively analyze .NET source code using the NDepend tool.

CQLinq is a LINQ-like query language used by NDepend to reflectively analyze .NET source code using the NDepend tool.

References

52 questions
11
votes
2 answers

Is it possible to exclude entire namespaces from NDepend analysis?

I have a setup where Visual Studio 2010 runs test coverage analysis and it's output is absorbed by NDepend during an integration build. A few assemblies contain generated code that needs to be ignored by NDepend. Is there a way to do this?…
Kilhoffer
  • 32,375
  • 22
  • 97
  • 124
7
votes
1 answer

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…
7
votes
2 answers

How to restrict NDepend methods query on type attribute

I'm trying to get NDepend to identify long methods using a modified version of the standard "Methods too big" query. I don't want to report long methods that the developers have little control over, so I filter out generated code using the…
Brian Rasmussen
  • 114,645
  • 34
  • 221
  • 317
7
votes
1 answer

Find all uses of a method (including via interface) using NDepend

Using NDepend, how can I find all, direct and indirect, uses of a specific method or property? In particular, I need to find usages that occur via an interface somewhere along the use path. Thanks!
Joel in Gö
  • 7,460
  • 9
  • 47
  • 77
5
votes
1 answer

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…
Lasse V. Karlsen
  • 380,855
  • 102
  • 628
  • 825
4
votes
1 answer

How can NDepend be instructed to ignore EF classes?

I'm having a little problem with NDepend not ignoring generated code. It's picking up issues around methods with too many parameters on the designer.cs file generated by EF when the entity data model is created. The class is commented with an…
Troy Hunt
  • 20,345
  • 13
  • 96
  • 151
4
votes
1 answer

NDepend -Finding dead methods

I have two public methods A & B. I modified CQL to show me methods which are public and dead. If B is only called by A and A is coming as dead method(not called or referenced anywhere in the application) can NDepend show both the methods as dead by…
Anuradha
  • 41
  • 2
4
votes
2 answers

Is Cassandra Update IF statement where the condition is an inequality expression supported?

Is UPDATE IF [condition] where [condition] is an inequality, supported by Cassandra CQL? I had a look over the language reference and it seems that CQL should not be able to support the inequality through its grammar. I used the language reference…
Dumb Questioner
  • 2,147
  • 4
  • 20
  • 21
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

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

NDepend Count, Average, etc.. reporting... aggregates. Possible? clean work arounds?

We have a huge code base, where methods with too many local variables alone returns 226 methods. I don't want this huge table being dumped into the xml output to clutter it up, and I'd like the top 10 if possible, but what I really want is the count…
Maslow
  • 18,464
  • 20
  • 106
  • 193
3
votes
1 answer

How can I find which property getters have side effects using NDepend?

A familiar problem using VisualStudio is the mysterious calling of property getters. If these have side effects (the most common being of the form if (foo == null) foo = new foo(); return foo; ), then the fact that the debugger Locals and Watch…
Joel in Gö
  • 7,460
  • 9
  • 47
  • 77
3
votes
1 answer

NDepend: Listing the attributes attached to a method, is it possible?

I am trying to use NDepend and its Linq based query language to generate some reports about the code's current state. I want to label some of my methods and classes with predefined "tags", for example the methods labeled with tag "Database" contains…
Ufuk Can Bicici
  • 3,589
  • 4
  • 28
  • 57
3
votes
1 answer

How do you display the relationships that connect ClassA to ClassX using NDepend?

BACKGROUND When driving through an unknown city, it is often preferable to have a map that can help guide you to your destination. Similarly, when looking at legacy code for the first time it is often preferable to have a diagram that can outline…
Pressacco
  • 2,815
  • 2
  • 26
  • 45
3
votes
1 answer

Ndepend find actual number of method usages

Let's say I have method A.M1. It is called in B.M2 2 times and in B.M3 3 times. I need to find all number of usages (like Resharper does through find usages interface). So the sum for method calls would be 5. Following Query: from m in Methods…
Sasha Reminnyi
  • 3,442
  • 2
  • 23
  • 27
1
2 3 4