Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement codefix for MSTEST0006 (AvoidExpectedException) #4038

Merged
merged 4 commits into from
Nov 12, 2024

Conversation

Youssef1313
Copy link
Member

Fixes #3399

@Youssef1313
Copy link
Member Author

@Evangelink Current implementation only wraps last statement. Let me know if we want to implement both fixes or if we want to go with this one first until we hear user feedback

@Evangelink
Copy link
Member

I think that will be the most used code fix so let's ship this one only for now and wait for feedback. Please once this is merged, update the documentation https://learn.microsoft.com/dotnet/core/testing/mstest-analyzers/mstest0006 to mention we have code fix and the version it's introduced into

Copy link
Member

@Evangelink Evangelink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add a test, sync and async (it's fine to do both in the same test) with multiple statements to clearly document we only wrap last statement?

@Evangelink Evangelink enabled auto-merge (squash) November 12, 2024 08:01
@Evangelink Evangelink merged commit be23aac into microsoft:main Nov 12, 2024
6 checks passed
@Youssef1313 Youssef1313 deleted the MSTEST0006-codefix branch November 12, 2024 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MSTEST0006: Add code fix
2 participants