Skip to content

Clarify ClassCleanupBehavior.EndOfClass usage syntax in MSTEST0034 documentation #47581

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jul 25, 2025

The "How to fix violations" section in the MSTEST0034 documentation was unclear about how to properly use ClassCleanupBehavior.EndOfClass with the [ClassCleanup] attribute. The previous text stated:

Use ClassCleanupBehavior.EndOfClass with the [ClassCleanup].

This wording assumes developers already know that [ClassCleanup] accepts a parameter and how to use it. The updated text now shows the exact syntax:

Use [ClassCleanup(ClassCleanupBehavior.EndOfClass)].

This change makes it immediately clear how to properly apply the ClassCleanupBehavior.EndOfClass parameter to the [ClassCleanup] attribute, eliminating confusion for developers trying to implement the fix.

Fixes #46094.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.


Internal previews

📄 File 🔗 Preview link
docs/core/testing/mstest-analyzers/mstest0034.md docs/core/testing/mstest-analyzers/mstest0034

Co-authored-by: Youssef1313 <31348972+Youssef1313@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Clarify usage of ClassCleanupBehavior.EndOfClass Clarify ClassCleanupBehavior.EndOfClass usage syntax in MSTEST0034 documentation Jul 25, 2025
@Copilot Copilot AI requested a review from Youssef1313 July 25, 2025 18:32
Copilot finished work on behalf of Youssef1313 July 25, 2025 18:32
@Youssef1313 Youssef1313 marked this pull request as ready for review July 25, 2025 18:36
@Youssef1313 Youssef1313 requested review from IEvangelist and a team as code owners July 25, 2025 18:36
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.

Clarify usage of ClassCleanupBehavior.EndOfClass
2 participants