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 use NDepend.Console.exe from script.
Ant.

- 13,237
- 6
- 61
- 92

- 3,369
- 5
- 25
- 23
-
If everything's right, you should see your custom CQLs output. The console runner is nothing but an alternative user interface which calls NDepend core just like the GUI does. No difference. Please write up in more detail what exactly you are doing. – Thomas Weller Sep 30 '10 at 08:23
1 Answers
Several different ways can be used to show code queries and code rules results in a report:
You can first transform your code query to a violated code rules like for example, transforming
from m in Methods select new {m, m.CyclomaticComplexity}
into
warnif count > 0 from m in Methods select new {m, m.CyclomaticComplexity}
...and then you need to set the following code query flag: Display list of items selected in report
You can also Reports groups of Code Queries in the report as explained here.
You can use the NDepend.API to programatically compile and execute Code Queries or Rules and browse programatically the result. See the source code of the Power Tool Query Code with CQLinq for more details about this. The source code of Power Tools can be found in $NDependInstallPath$\NDepend.PowerTools.SourceCode\NDepend.PowerTools.sln

- 13,237
- 6
- 61
- 92