Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jul 29, 2025

This PR adds documentation for the MSTEST0050 analyzer rule, which was missing from the MSTest analyzer documentation.

The GlobalTestFixtureShouldBeValidAnalyzer (MSTEST0050) validates that global test fixture methods marked with GlobalTestInitializeAttribute or GlobalTestCleanupAttribute follow the required layout and configuration rules.

Changes made:

  • Created mstest0050.md: Complete documentation following the established pattern for MSTest analyzer rules, including:

    • Rule metadata table with all required properties (default severity "Error", no code fix available)
    • Clear description of the rule's purpose and specific method requirements
    • Code examples showing both violations and fixes
    • Proper cross-references to MSTest framework types
  • Updated usage-rules.md: Added MSTEST0050 to the usage rules catalog to ensure it's discoverable

The documentation follows Microsoft Writing Style Guide conventions and is consistent with existing analyzer documentation in the repository. All markdown linting passes successfully.

Fixes #47607.


💬 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/mstest0050.md docs/core/testing/mstest-analyzers/mstest0050
docs/core/testing/mstest-analyzers/usage-rules.md docs/core/testing/mstest-analyzers/usage-rules
docs/navigate/devops-testing/toc.yml docs/navigate/devops-testing/toc

Copilot AI changed the title [WIP] Document MSTEST0050 Document MSTEST0050 analyzer rule Jul 29, 2025
Copilot AI requested a review from Youssef1313 July 29, 2025 08:05
Copilot finished work on behalf of Youssef1313 July 29, 2025 08:05
Copilot AI requested a review from Youssef1313 July 29, 2025 08:11
Copilot finished work on behalf of Youssef1313 July 29, 2025 08:11
Copy link
Member

@Youssef1313 Youssef1313 left a comment

Choose a reason for hiding this comment

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

@copilot Please update docs/navigate/devops-testing/toc.yml as well.

- Change attribute names from AssemblyInitialize/AssemblyCleanup to GlobalTestInitialize/GlobalTestCleanup
- Replace general violations list with specific method requirements
- Simplify the "How to fix violations" section
- Update usage-rules.md for consistency

Co-authored-by: Youssef1313 <[email protected]>
Copilot AI requested a review from Youssef1313 July 29, 2025 08:20
Copilot finished work on behalf of Youssef1313 July 29, 2025 08:20
Copy link
Contributor Author

Copilot AI commented Jul 29, 2025

@copilot Please update docs/navigate/devops-testing/toc.yml as well.

Added MSTEST0050 to the devops-testing toc.yml file. Change applied in commit 56fefa5.

Copilot finished work on behalf of Youssef1313 July 29, 2025 08:27
@Youssef1313 Youssef1313 marked this pull request as ready for review July 29, 2025 08:29
@Youssef1313 Youssef1313 requested review from a team and IEvangelist as code owners July 29, 2025 08:29
@nohwnd nohwnd merged commit f3f7659 into main Jul 29, 2025
10 checks passed
@nohwnd nohwnd deleted the copilot/fix-47607 branch July 29, 2025 08:41
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.

Document MSTEST0050

3 participants