Skip to content

docs: Put GitHubWorkItem on test methods only - #25565

Merged
MartinZikmund merged 1 commit into
unoplatform:masterfrom
mikernet:dev/mikernet/rules-githubworkitem-method
Nov 10, 2026
Merged

MartinZikmund merged 1 commit into
unoplatform:masterfrom
mikernet:dev/mikernet/rules-githubworkitem-method

Conversation

@mikernet

Copy link
Copy Markdown
Contributor

GitHub Issue: N/A (documentation only)

PR Type:

🤖 Project automation

What changed? 🚀

.claude/rules/runtime-tests.md and .claude/rules/unit-tests.md told agents that [GitHubWorkItem] can go on a test method or a test class. MSTest declares GitHubWorkItemAttribute with AttributeTargets.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 ✅

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.
Copilot AI balanced review requested due to automatic review settings October 18, 2026 00:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 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

@unodevops

Copy link
Copy Markdown
Contributor

@MartinZikmund
MartinZikmund merged commit c00f099 into unoplatform:master Nov 10, 2026
15 checks passed
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.

4 participants