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

Added TestContext.Write Is Obsolete Analyzer #772

Merged

Conversation

manfred-brands
Copy link
Member

Fixes #770

Copy link
Member

@mikkelbu mikkelbu left a comment

Choose a reason for hiding this comment

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

LGTM. Only some minor nit-picks.

I've not had time to follow the discussion in the NUnit repo, but as far as I can tell these methods have not been marked as obsolete yet in the framework, so this Analyzer might confuse users by breaking the compilation - severity error - although the framework is fine, so perhaps this should just be warning (or perhaps we should rephrase the text a little to make it explicit, that these methods will be obsolete and then removed in future versions of the framework?)

@mikkelbu
Copy link
Member

mikkelbu commented Aug 7, 2024

Just noticed that we have forgotten to update the sln file with the new markdown file

@manfred-brands
Copy link
Member Author

I've not had time to follow the discussion in the NUnit repo, but as far as I can tell these methods have not been marked as obsolete yet in the framework, so this Analyzer might confuse users by breaking the compilation - severity error - although the framework is fine, so perhaps this should just be warning (or perhaps we should rephrase the text a little to make it explicit, that these methods will be obsolete and then removed in future versions of the framework?)

I have both change the level to Warning and rephrased it from are Obsolete into will be marked as Obsolete and eventually removed

@manfred-brands manfred-brands merged commit b59c564 into nunit:master Aug 9, 2024
6 checks passed
@manfred-brands manfred-brands deleted the Issue770_TestContext.Write branch August 9, 2024 07:28
@mikkelbu mikkelbu added this to the Release 4.3 milestone Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add rule to detect calls to TestContext.Write methods and CodeFix to replace usages with Out.Write
2 participants