-
Notifications
You must be signed in to change notification settings - Fork 237
Closed
Labels
False PositiveRule IS triggered when it shouldn't be.Rule IS triggered when it shouldn't be.
Milestone
Description
Description
False Positive of S3459 for backing field with ref property.
Repro steps
public class MyClass
{
private int _foo;
public ref int Foo => ref _foo;
}Expected behavior
No warning
Actual behavior
warning S3459: Remove unassigned field '_foo', or set its value. (https://rules.sonarsource.com/csharp/RSPEC-3459)
Known workarounds
Supress this warning manually
Related information
- C#/VB.NET Plugins version: SonarAnalyzer.CSharp 9.23.2.88755
- Visual Studio version 17.9.2
- MSBuild / dotnet version: dotnet 8.0.200
- SonarScanner for .NET version (if used)
- Operating System: Windows 10
Metadata
Metadata
Assignees
Labels
False PositiveRule IS triggered when it shouldn't be.Rule IS triggered when it shouldn't be.