views:

58

answers:

3

Hi,

I just downloaded a trial version of NDepend. What I'm looking for is a tool that helps in standardization of code. Not only in style of braces, spaces, naming conventions, etc, but also in cohesion & complexity.

Is anybody using it that can tell me if I can integrate cohesion & complexity into the build errors (in example, if complexity is greater > n, then error)??? I want to know if this is integrated with the tool before I start writing my own xml reader to parse the NDepend results.

I know some version of Visual Studio 2008 have these metrics, but NDepened seems to have it independently of visual studio versions. Is there another tool that you would recommend???

thanks!

A: 

stylecop - http://code.msdn.microsoft.com/sourceanalysis

fxcop - http://msdn.microsoft.com/en-us/library/bb429476%28VS.80%29.aspx

PaulStack
Hi PaulStack, I had already saw these tools, but they don't have metrics, do they??? I'm taking a look at SourceMonitor since it has metrics too ... and it is free so it is an advantage
Rafael
no they dont have metrics but they will adhere to the first part of your question - "a tool that helps in standardization of code. Not only in style of braces, spaces, naming conventions"
PaulStack
ok... BTW, do you know if the integrated Visual Studio 2008/2010 Analysis tools have integration with MSBuild??? can they be called from command line???
Rafael
+1  A: 

Visual Studio Code Analysis (the paid version of FxCop that is integrated into some editions of Visual Studio) includes rules for the same set of code metrics exposed by the Visual Studio Code Metrics functionality. These rules are customizable, so you can adjust their threshold values for warning and error conditions if you so desire.

Nicole Calinoiu
A: 

Why would you parse NDepend result while NDepend can warn live right into Visual Studio if a CQL rule is violated?

Patrick Smacchia - NDepend dev
Hi Patrick, the company want a code policy a) at Developer level, so MSBuild doesn't let you compile if you're violating style or CQL rules (and breaking team work cause of that) and b) at Manager level, so they can do their evaluations. I liked NDepend (very professional) so I tried to introduce it. I emailed the NDepend guys asking for the MSBuild option but they said it is a planned feature for now. Xml parsing would have been the option to get that functionality by myself, but license per developer played a factor. Let see if I can buy NDepend (and SQL prompt) for my own in the near future
Rafael
I am a NDepend guy :) (as seen in my pseudo) and I confirm, failing build is a upcoming feature
Patrick Smacchia - NDepend dev
In your previous comment it only reads "Patrick Smacchia - N"... I see the "NDepend dev" now... good to hear about the breaking build feature... very good work BTW
Rafael