Repository navigation
docs: Put GitHubWorkItem on test methods only - #25565
Merged
MartinZikmund merged 1 commit intoNov 10, 2026
Merged
MartinZikmund merged 1 commit into
MartinZikmund merged 1 commit into
Conversation
The runtime and unit test rules said the attribute could go on a method or a class. MSTest declares GitHubWorkItemAttribute with AttributeTargets.Method, so a class-level one fails to compile with CS0592.
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
Both documentation corrections are consistent with the attribute restriction and introduce no executable changes.
No open issues 🎉
What changed in this PR
Corrects test-authoring guidance to require [GitHubWorkItem] on test methods, preventing invalid class-level usage.
Changes:
- Updates unit-test and runtime-test rules to reflect MSTest’s method-only restriction.
- Preserves the distinction between issue metadata and test skipping.
| File | Description |
|---|---|
.claude/rules/unit-tests.md |
Requires issue attributes on test methods. |
.claude/rules/runtime-tests.md |
Requires method-level placement and explains CS0592. |
Review effort: Balanced
Contributor
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-25565/docs/index.html |
MartinZikmund
approved these changes
Nov 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GitHub Issue: N/A (documentation only)
PR Type:
🤖 Project automation
What changed? 🚀
.claude/rules/runtime-tests.mdand.claude/rules/unit-tests.mdtold agents that[GitHubWorkItem]can go on a test method or a test class. MSTest declaresGitHubWorkItemAttributewithAttributeTargets.Method(checked in MSTest 4.2.1, the version the repo uses), so a class-level attribute fails to compile with CS0592. Both rules now say to put it on the test method.PR Checklist ✅
Screenshots Compare Test Runresults.