Are there any tools which can report on commented-out .NET code?

Has anyone come across a tool to report on commented-out code in a .NET app? I'm talking about patterns like:

//var foo = "This is dead";

And

/*
var foo = "This is dead";
*/

This won't be found by tools like ReSharper or FxCop which look for unreferenced code. There are obvious implications around distinguishing commented code from commented text but it doesn't seem like too great a task.

Is there any existing tool out there which can pick this up? Even if it was just reporting of occurrences by file rather than full IDE integration.

Edit 1: I've also logged this as a StyleCop feature request. Seems like a good fit for the tool.

Edit 2: Yes, there's a good reason why I'd like to do this and it relates to code quality. See my comment below.

18
задан Troy Hunt 12 April 2011 в 08:56
поделиться