-
Notifications
You must be signed in to change notification settings - Fork 237
Closed
Labels
False NegativeRule is NOT triggered when it should be.Rule is NOT triggered when it should be.
Milestone
Description
Description
S1144 does not highlight unused private getters or setters when they are inside a public property.
Repro steps
public class PropertyAccess
{
public int PrivateGetter { private get; set; } // FN - unused private getter
public int PrivateSetter { get; private set; } // FN - unused private setter
public int ExpressionBodiedPropertyWithPrivateGetter { private get => 1; set => _ = value; } // FN - unused private getter
public int ExpressionBodiedPropertyWithPrivateSetter { get => 1; private set => _ = value; } // FN - unused private setter
}
Expected behavior
An issue should be raised for the unused getter or setter.
Actual behavior
No issue is raised.
Known workarounds
None.
Related information
- C#/VB.NET Plugins version: 8.52
- Visual Studio version: 2022 17.4.4
- Operating System: Windows 10 Pro (10.0.19045)
Metadata
Metadata
Assignees
Labels
False NegativeRule is NOT triggered when it should be.Rule is NOT triggered when it should be.