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

S1854: Add FP repro for #9471, #9472, #9473 #9474

Merged
merged 4 commits into from
Jun 27, 2024

Conversation

mary-georgiou-sonarsource
Copy link
Contributor

Related to #9471, #9472, #9473

Copy link
Contributor

@pavel-mikula-sonarsource pavel-mikula-sonarsource left a 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;
Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

@pavel-mikula-sonarsource pavel-mikula-sonarsource left a 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

Copy link

sonarcloud bot commented Jun 27, 2024

Copy link

sonarcloud bot commented Jun 27, 2024

@mary-georgiou-sonarsource mary-georgiou-sonarsource merged commit acae04d into master Jun 27, 2024
26 checks passed
@mary-georgiou-sonarsource mary-georgiou-sonarsource deleted the mary/repros branch June 27, 2024 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Sprint: Hardening Fix FPs/FNs/improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants