Suggestion to use "is { }" pattern for null checking is wrong.
Take this piece of code:
private void OnDrawGizmosSelected()
{
Gizmos.DrawSphere(rb.position, 1.0f);
}
Check expression for null changes it to this which doesn't work for Unity objects:
private void OnDrawGizmosSelected()
{
if (rb is { })
Gizmos.DrawSphere(rb.position, 1.0f);
}
Instead it should do this:
private void OnDrawGizmosSelected()
{
if (rb != null)
Gizmos.DrawSphere(rb.position, 1.0f);
}
Now that's even more problematic because nowhere in the options this can be changed.
JetBrains ReSharper 2020.3 Build 203.0.20201211.113035 Unity Support 2020.3.1.132
Is this using C# 8? Does the project compile correctly (with if (rb is { })) in Unity?
Order of generated null checks can be specified in the "Null Checking" tab of Preferences | Editor | Code Style | C#, but classic (if (arg == null)) should be first.
The project compiles properly, rather, it's a usability problem, this syntax isn't correct because Unity circumvents some operators.
See the following example, b should be True in this case:

For the null checking syntax, it's a bit unfortunate, I triple checked and indeed it was the case, but ending up reinstalling R# auto-magically fixed it. 🤣
I also have this problem and I don't know how to fix this in Preferences | Editor | Code Style | C#. The settings seem to only work for null assertions and not null checks. Am I missing something?