SonarCloud incorrectly flagged an array as null in at least one case.
Is this a known bug? Is there a work-around for this?
- ALM used - Azure DevOps
- CI - Azure DevOps
- Languages of the repository - C#
SonarCloud incorrectly flagged an array as null in at least one case.
Is this a known bug? Is there a work-around for this?
Hi @p97,
I can confirm that this is a false positive, a known one. We have it documented here:
As a workaround, you can replace the usage of the null-coalescence operator with a null equality check.
This is not great, I know, but we are working currently to improve our symbolic execution engine and reduce the number of false positives like this one.
Best,
Costin