Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix S1144 FP: Getters/Setters of property with attribute are being flagged #9219

Closed
Daeymon opened this issue Apr 29, 2024 · 1 comment · Fixed by #9233
Closed

Fix S1144 FP: Getters/Setters of property with attribute are being flagged #9219

Daeymon opened this issue Apr 29, 2024 · 1 comment · Fixed by #9233
Assignees
Labels
Area: C# C# rules related issues. Type: False Positive Rule IS triggered when it shouldn't be.
Milestone

Comments

@Daeymon
Copy link

Daeymon commented Apr 29, 2024

Description

Members with an attribute are being flagged. The documentation states they should be exceptions to the rule.
image

Repro steps

image

Expected behavior

The setter should not be flagged.

Actual behavior

The setter is flagged.

Related information

SonarAnalyzer.CSharp: 9.24.0.89429
Visual Studio: 17.9.6
Dotnet version: .NET 8
Operating System: Windows 10 Enterprise, 21H2

@gregory-paidis-sonarsource gregory-paidis-sonarsource changed the title Fix S1144 FP: Members with attribute are being flagged. Fix S1144 FP: Getters/Setters of property with attribute are being flagged. May 1, 2024
@gregory-paidis-sonarsource gregory-paidis-sonarsource changed the title Fix S1144 FP: Getters/Setters of property with attribute are being flagged. Fix S1144 FP: Getters/Setters of property with attribute are being flagged May 1, 2024
@gregory-paidis-sonarsource gregory-paidis-sonarsource added Type: False Positive Rule IS triggered when it shouldn't be. Area: C# C# rules related issues. labels May 1, 2024
@gregory-paidis-sonarsource
Copy link
Contributor

Hey there,
I can confirm this is an FP, and I added it to our backlog to track it.
I will try to come up with a fix for you soon, as the case seems isolated to properties.

Thanks for raising this!
Feel free to track this ticket, it will be closed when the fix is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: C# C# rules related issues. Type: False Positive Rule IS triggered when it shouldn't be.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants