Template for a good new topic, formatted with Markdown:
- ALM used: Azure DevOps
- CI system used: Azure Pipelines
- Languages of the repository: C#
I’ve noticed that SonarLint does not find issue S2583 in VisualStudio in Connected Mode, however the issue is correcty found in the PR scan.
Here is a sample code:
public class Class1
{
public string GetString()
{
var value2 = string.Join(",", new string[] { "a", "b" });
var value3 = value2 ?? string.Empty;
return value3;
}
}
Locally I don’t see the error, however in the PR scan I get error in the line var value3 = value2 ?? string.Empty
with the message: Change this expression which always evaluates to the same result. Some code paths are unreachable.
Is that the expected behaviour, and that error is not found by SonarLint only by SonarCloud?