Hello,
I have a problem how SonarLint for Visual Studio 2022 (Version 6.13.0.62767 running on Win 11) fixes the issue S1125 in some cases, and I haven’t found any bug reports regarding this issue:
The statement
var test = obj == null ? false : obj.ToString() == "x" || obj.ToString() == "y";
gets fixed to
var test = !(obj == null) && obj.ToString() == "x" || obj.ToString() == "y";
This will lead to a null pointer exception if obj is null, which would not happen in the original code.