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

Consider readonly TestContext as valid #4053

Merged
merged 12 commits into from
Nov 19, 2024

Conversation

Youssef1313
Copy link
Member

Fixes #4032

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 double check if we have a test case where we would have readonly TestContext property and no ctor accepting TestContext parameter? I think we should still raise in this case because the property would end up not being set.

@Youssef1313
Copy link
Member Author

Youssef1313 commented Nov 16, 2024

We don't have a good way to detect that at run-time. Do you think going for an analyzer would be the best approach for now?

Edit: Adjusted the existing analyzer

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.

Thanks for the updates @Youssef1313, a few nits but otherwise LGTM

@Evangelink
Copy link
Member

Happy with the current state so I'll move the PR as-is. Thanks @Youssef1313

@Evangelink Evangelink merged commit 50a71e6 into microsoft:main Nov 19, 2024
6 checks passed
@Youssef1313 Youssef1313 deleted the testcontext-validity branch November 19, 2024 18:55
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.

FP warning UTA031
2 participants