fix: document and test PublicMethodMissingTestAttributeAnalyzer property/event handling - #4912
Merged
Merged
Conversation
thomhurst
temporarily deployed
to
Pull Requests
February 19, 2026 00:13 — with
GitHub Actions
Inactive
thomhurst
temporarily deployed
to
Pull Requests
February 19, 2026 00:13 — with
GitHub Actions
Inactive
thomhurst
temporarily deployed
to
Pull Requests
February 19, 2026 00:13 — with
GitHub Actions
Inactive
Contributor
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. The changes look clean and well-targeted:
|
thomhurst
force-pushed
the
fix/public-method-analyzer
branch
from
February 19, 2026 08:05
da59365 to
a45bce7
Compare
thomhurst
had a problem deploying
to
Pull Requests
February 19, 2026 08:05 — with
GitHub Actions
Failure
thomhurst
had a problem deploying
to
Pull Requests
February 19, 2026 08:05 — with
GitHub Actions
Failure
thomhurst
had a problem deploying
to
Pull Requests
February 19, 2026 08:05 — with
GitHub Actions
Failure
thomhurst
force-pushed
the
fix/public-method-analyzer
branch
from
February 19, 2026 09:39
a45bce7 to
6847e5f
Compare
thomhurst
had a problem deploying
to
Pull Requests
February 19, 2026 09:39 — with
GitHub Actions
Failure
thomhurst
had a problem deploying
to
Pull Requests
February 19, 2026 09:39 — with
GitHub Actions
Failure
thomhurst
had a problem deploying
to
Pull Requests
February 19, 2026 09:39 — with
GitHub Actions
Failure
…ibuteAnalyzer (#4863) The MethodKind.Ordinary filter already correctly excludes property accessors (PropertyGet/PropertySet), event accessors (EventAdd/EventRemove), constructors, destructors, and operators. Added a clarifying comment to document this behavior and new test cases for properties, events, overrides, and static methods to prevent future regressions.
thomhurst
force-pushed
the
fix/public-method-analyzer
branch
from
February 19, 2026 11:47
6847e5f to
7cec0a4
Compare
thomhurst
had a problem deploying
to
Pull Requests
February 19, 2026 11:47 — with
GitHub Actions
Failure
thomhurst
temporarily deployed
to
Pull Requests
February 19, 2026 11:47 — with
GitHub Actions
Inactive
thomhurst
temporarily deployed
to
Pull Requests
February 19, 2026 11:47 — with
GitHub Actions
Inactive
This was referenced Feb 22, 2026
Closed
This was referenced Mar 27, 2026
This was referenced Apr 4, 2026
This was referenced Apr 13, 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.
Summary
Closes #4863
PublicMethodMissingTestAttributeAnalyzerproduces false positives on property getters/setters and event handlersMethodKind.Ordinaryfilter already correctly excludes these cases. In Roslyn'sMethodKindenum, property accessors haveMethodKind.PropertyGet/PropertySetand event accessors haveMethodKind.EventAdd/EventRemove— all distinct fromMethodKind.OrdinaryTest plan
dotnet build TUnit.Analyzers/TUnit.Analyzers.csprojsucceeds