Skip to content

What's the recommended way to work around IDE0058 for mocks? #1486

Closed Answered by kzu
Bartleby2718 asked this question in Q&A
Discussion options

You must be logged in to vote

Yep, since you can keep invoking more methods after Returns, you'll get that warning. I'd disable it globally for all test projects, something like:

# Test settings
[**/*Tests*/**{.cs,.vb}]
# Remove unnecessary expression value
dotnet_diagnostic.IDE0058.severity = none

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Bartleby2718
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants