Assertions comparing incompatible types always fail, and negative assertions always pass. At best, negative assertions are useless. At worst, the developer loses time trying to fix his code logic before noticing wrong assertions.


Dissimilar types are:

* comparing a primitive with null
* comparing an object with an unrelated primitive (E.G. a string with an int)
* comparing unrelated classes
* comparing an array to a non-array
* comparing two arrays of dissimilar types

This rule also raises issues for unrelated ``++class++`` and ``++interface++`` or unrelated ``++interface++`` types in negative assertions. Because except in some corner cases, those types are more likely to be dissimilar. And inside a negative assertion, there is no test failure to inform the developer about this unusual comparison.


Supported test frameworks:

* JUnit4
* JUnit5
* AssertJ
