vs-threading icon indicating copy to clipboard operation
vs-threading copied to clipboard

Disable VSTHRD200 for test methods

Open cremor opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe.

Test methods should not trigger VSTHRD200. But I also don't want to disable the rule for the whole test project like suggested in the recommended .editorconfig files.

Describe the solution you'd like

VSTHRD200 should ignore methods that have any of the following attributes applied:

  • [TestMethod] (MSTest)
  • [Fact] (xUnit)
  • [Test] (NUnit)
  • [Theory] (xUnit and NUnit)

When this is implemented the recommended .editorconfig files should be updated too.

Describe alternatives you've considered

Disabling VSTHRD200 for the whole test project, which I don't want.

cremor avatar May 17 '24 07:05 cremor