4

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 doing some settings or by CQL?

In current scenario I am getting only A as dead method not B.

Patrick from NDepend team
  • 13,237
  • 6
  • 61
  • 92
Anuradha
  • 41
  • 2

1 Answers1

2

can NDepend show both the methods as dead by doing some settings or by CQL?

Yes, NDepend can do that thanks to Code Rule over LINQ Query (CQLinq) capabilities.

Around 200 default code rules are proposed, 3 of them being dedicated to unused/dead code detection:

If you click these 3 links above toward the source code of these rules, you'll see that the ones concerning types and methods are a bit complex. This is because these rules detect not only unused types and methods, but also types and methods used only by unused dead types and methods (recursive, what you are asking for).

Patrick from NDepend team
  • 13,237
  • 6
  • 61
  • 92