-
-
Notifications
You must be signed in to change notification settings - Fork 114
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
Description
File: TUnit.Analyzers/PublicMethodMissingTestAttributeAnalyzer.cs (Lines 35-46)
The analyzer filters for MethodKind.Ordinary but doesn't explicitly exclude property accessor methods. If a test class has public properties, the compiler-generated get_/set_ methods could be flagged as missing a test attribute.
Impact
False positives on compiler-generated property accessors, reducing confidence in the analyzer.
Suggested Fix
Add filters to exclude MethodKind.PropertyGet, MethodKind.PropertySet, MethodKind.EventAdd, MethodKind.EventRemove, and other compiler-generated methods.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers