Skip to content

Commit

Permalink
Disable xUnit2014 diagnostic
Browse files Browse the repository at this point in the history
This diagnostic forces the use of Assert.ThrowsAsync for any async method,
however in our case we may want to test that a method will throw
synchronously to avoid regressing that behavior by moving to the async
portion of the method.
  • Loading branch information
ericstj committed Jan 18, 2022
1 parent 7b0f28f commit 6542882
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eng/CodeAnalysis.test.globalconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1681,7 +1681,7 @@ dotnet_diagnostic.xUnit2012.severity = warning
dotnet_diagnostic.xUnit2013.severity = none

# xUnit2014: Do not use throws check to check for asynchronously thrown exception
dotnet_diagnostic.xUnit2014.severity = warning
dotnet_diagnostic.xUnit2014.severity = none

# xUnit2015: Do not use typeof expression to check the exception type
dotnet_diagnostic.xUnit2015.severity = warning
Expand Down

0 comments on commit 6542882

Please sign in to comment.