deepsourcestatus / test-repository

Consider using the null-coalescing operator to simplify the null check CS-R1024
Anti-pattern
Major
8 months ago8 months old
null check expression can be simplified
 53
 54        // CS-R1024: Use `null-coalescing` operator, i.e. rewrite as `i ?? 1`.
 55        // https://deepsource.io/directory/analyzers/csharp/issues/CS-R1024
 56        var value = i != null ? i : 1; 57
 58        // CS-R1007: Use `Guid.Empty` instead.
 59        // https://deepsource.io/directory/analyzers/csharp/issues/CS-R1007