views:

121

answers:

2

According to this blog the build in code metrics feature in VS2008 Team Edition is suppose to be smart enough to skip generated code. It's not. Is there an option somewhere that I need to set?

+1  A: 

There are a few tags that affect this, depending on the source (MSDN/blogs/...)

  • CompilerGenerated
  • ToolGenerated
  • GeneratedCode
  • DebuggerNonUserCode

I'm not sure which of these works best in your case, but iirc I was able to get the metrics working right using one of these. Let me know how it worked out in your case.

mafutrct
A: 

The real answer to this question is I gave up. :-) After messing with it a bit I got the distinct impression that the code metric feature was mostly a marketing stunt for Team System and nobody really invested in making it work well. I hope that changes in 2010--while metrics can be misused they can provide valuable insights as well.

Jeff
P.s. Thanks for taking the time to comment on such an old question. +1 vote!
Jeff