Bluehill.Analyzers

BH0008: Don't repeat negative patterns

The negated pattern should not be used repeatedly.

Code with violation

public class TestClass {
    public (bool, bool) TestMethod1(object? obj1, object? obj2) {
        return (obj1 is not not null, obj2 is not not not null);
    }
}

Fixed Code

public class TestClass {
    public (bool, bool) TestMethod1(object? obj1, object? obj2) {
        return (obj1 is null, obj2 is not null);
    }
}