Visual Studio is kind enough to generate a lot of code for us when we create and design Windows.Forms controls. It also surrounds most of it with a #region statement. In newer versions it also uses a partial class to separate generated from manually created code. Developers are supposed to edit code only in certain areas.
But nothing prevents us from violating this in whatever way we please. I'm fine with manual edits that could just as well have been made from the designer, or manual edits in areas the designer doesn't touch. But I'd like to flag any other kind of edit.
Does anyone know a utility that can do this? StyleCop rules perhaps? I mostly need it for the combination of C#, Windows.Forms, and Visual Studio 2003, 2005, and 2008.