Just saw an article about a new tool for Java that I know will have to make the transition to .NET: Crap4J. It's an Eclipse plugin to detect "CRAPpy" code. Their crappiness algorithm uses the cyclomatic complexity combined with unit test coverage to calculate the CRAP. Their tool will also calculate a "CRAP Load", which is an estimation of how much work it will take to get the crap out of your code. Seriously.