SonarClould seems providing a false positive of that rule on this type of code:
var retries = 0;
var ok = false;
do
{
try
{
// Try do something...
ok = true;
}
catch
{
retries++;
}
}
while (!ok && retries < 5);
SonarClould seems providing a false positive of that rule on this type of code:
var retries = 0;
var ok = false;
do
{
try
{
// Try do something...
ok = true;
}
catch
{
retries++;
}
}
while (!ok && retries < 5);
We can confirm that it is indeed a false positive. This is a known issue which has the same root cause as the one described here: https://github.com/SonarSource/sonar-dotnet/issues/2600.
Thanks for your feedback!
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.