- Operating system: Windows 10
- SonarLint plugin version: 6.13.0.62767
- Programming language you’re coding in: C#
- Is connected mode used: No
- Connected to SonarCloud or SonarQube (and which version): No
And a thorough description of the problem / question:
I have a simple function, taking a nullable parameter:
private static bool IsTen(int? value)
{
return value.Value == 10;
}
I can call it with a null value, like this:
var gotTen = IsTen(null);
I expected SonarLint to complain about the “value.Value” access, in the IsTen function, but it doesn’t.
Tried in a separate project too, just to check nobody disabled the rule by mistake.
Is this a bug? If not, please consider it a feature request.