Skip to content

Consider Writing a Suppressor for CA2000 #396

@JasonBock

Description

@JasonBock

Describe the solution you'd like

If I have a test like this:

using var context = new RockContext();
var disposable = context.Create<IDisposableCreateExpectations>();
disposable.Methods.Dispose();

iUseDisposable.Use(disposable.Instance());

I get a CA2000 on the Instance() call. Rocks should suppress this because it's expected the developer will use the instance in such a way that the instance will be disposed.

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions