Folks:
My I recommend the addition of a new rule (or does this rule already exist ).
FxCop should generate a warning message when an object that implements the IDisposable interface is instantiated in a method, and is only used in that method, and is not part of a using block, and isn't disposed.
Sincerely,
Eric Bergman-Terrell
www.PersonalMicroCosms.com

New FxCop Rule Requested
VasuK
Hi James,
I would love to receive the code now if you don't mind. I will use it until MS ships the new rules. I have currently no time to create it myself.
Thanks,
Fons
Bryce Eddings
Michael
CSomercik
I would post the source, but as I said it's rather messy (rule has 3 level inheritence - our generic base class that sets the rule XML location etc, a class on top of that which contains methods for identifying using constructs in IL (you need to keep track of certain locals / stack positions) and the the rule on top).
Or you could wait until they publish this rule ;)
hoabinh
Hi Michael,
Are you planning to publish this extra rule soon
Thanks,
Fons
ghenap
I think that alone would be more helpful than all the other rules put together. (Though the rest of the rules are still really useful.)
Jonathan
PeterSanDiego
This rule won't make it in the RTM of FxCop 1.35, however, it will be shipped in the next version after that.
We are in the process of rewritting our dataflow analysis, so basically any rule that touches a method body (ie Method.Instructions), including this one, will be rewritten along with it.