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

S4829 FP: Using Console.In inside a nameof #6282

Closed
gregory-paidis-sonarsource opened this issue Nov 4, 2022 · 1 comment
Closed

S4829 FP: Using Console.In inside a nameof #6282

gregory-paidis-sonarsource opened this issue Nov 4, 2022 · 1 comment
Labels
Area: C# C# rules related issues. Type: False Positive Rule IS triggered when it shouldn't be.

Comments

@gregory-paidis-sonarsource
Copy link
Contributor

Description

False Positive for ReadingStandardInput (S4829), when using Console.In inside a nameof.

Repro steps

var consoleIn = nameof(Console.In); // Noncompliant

Expected behavior

It should not be raising an issue, since it is just a compile-time evaluation to a string ("In")

Actual behavior

It raises an issue.

@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 Nov 9, 2022
@pavel-mikula-sonarsource
Copy link
Contributor

Rule has been deperecated and deleted in #8049

@pavel-mikula-sonarsource pavel-mikula-sonarsource closed this as not planned Won't fix, can't repro, duplicate, stale Feb 16, 2024
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

No branches or pull requests

2 participants