-
Notifications
You must be signed in to change notification settings - Fork 227
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
S1854: Add FP repro for #9471, #9472, #9473 #9474
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once #9469 gets merged, you could move the methods into the class I added (there's less nesting, as my class is not in the useless namespace)
// https://github.com/SonarSource/sonar-dotnet/issues/9471 | ||
void Repro9471(bool condition) | ||
{ | ||
byte[]? tempArray = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need byte[]?
to complicate this case, or would string be enough? This is not nullable codebase anyway
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant string
instead of string[]
. To get rid of the array, and nullability
analyzers/tests/SonarAnalyzer.Test/TestCases/DeadStores.RoslynCfg.cs
Outdated
Show resolved
Hide resolved
analyzers/tests/SonarAnalyzer.Test/TestCases/DeadStores.RoslynCfg.cs
Outdated
Show resolved
Hide resolved
a526121
to
8f95770
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, please remove the array before merging
Quality Gate passed for 'Sonar .NET Java Plugin'Issues Measures |
Quality Gate passed for 'SonarAnalyzer for .NET'Issues Measures |
Related to #9471, #9472, #9473