While tinkering in Visual Studio 2008 today, I saw a context menu item on a project I’d not seen before: Calculate Code Metrics. And there’s another called Run Code Analysis just above it. Pleasingly, if unsurprisingly, you get some metrics about your code. That’s right – feedback on your code from within the IDE. Ok, so it’s got a little way to go before it can compete with the code metrics tools you’re probably using now, but this is a very encouraging start. Somehow, this feature escaped my attention until now. There’s more info in this post from Somasegar and this post from the Code Analysis Team. One more reason to use Visual Studio 2008.