views:

74

answers:

1

Hi Everybody,

I am looking for a free code metrics tool for .NET (mainly C# language). I have searched the web, but haven't found anything that matches my requirements.

Requirements
1. LOC and CC metrics (mainly)
2. NAnt intregration is possible
3. No configuration file needed (provide the source files and config parameter via console arguments)
4. HTML output (or XML if GUI exists to view the file)

So road so far:
1. NDepend (Commercial)
2. Source Monitor (No good integration)
3. Code Metrics Plugin for Reflector (No console, any way to use it?)

If you use one of these tools (except NDepend; Commercial) I would like to hear your nant integration :-)

Thanks in advance.

A: 

Regarding SourceMonitor I don't agree with You. We have integrated SourceMonitor in our Continuous Integration Environment and call it through NAnt via command line. Passing the arguments by a configuration file is easy when You use a template and NAnt's <filterchain> function. The output is XML which we transform through XSLT into a user friendly report.

Find more Information on Richard Banks' blog. Some of the examples are CruiseControl.NET realated but I'm sure You can cherry pick the stuff relevant to You.

The Chairman
Thanks for your answer. I will see what I can do
Dennis
Is there a way to export method metrics? I only see the option to export a summary and/or project details without methods. Any Advice? Thanks in advance
Dennis
I need to check this. It's been a time ago I set SourceMonitor integration up. Stay tuned...
The Chairman
I finally found it: You need to check "Include method-level metrics counts in XML details reports" on the SourceMonitor options Export tab. If you configure SourceMonitor via command line and settings file, You need to add <export_option>3</export_option> to the export section.
The Chairman
Great that works fine for me. Thank you.
Dennis