18 lines
1.0 KiB
Plaintext
18 lines
1.0 KiB
Plaintext
=== replaces: S2161
|
|
|
|
=== on 15 Oct 2014, 21:50:59 Freddy Mallet wrote:
|
|
We're advising the opposite in the compliant solution of rule RSPEC-2097 @Ann. And we're doing that because 95% of the time, developers are using ``++instanceof++`` operator which is more readable than checking the equality of classes.
|
|
|
|
|
|
I guess this rule might remain valuable in some specific contexts but I would not activate it by default.
|
|
|
|
=== on 16 Oct 2014, 15:44:56 Ann Campbell wrote:
|
|
\[~freddy.mallet] I've updated RSPEC-2097 because the old example was broken for child classes since the advice is to use the parent class' ``++equals++`` method for parent class fields and check child class fields in the child's ``++equals++`` method.
|
|
|
|
=== on 16 Oct 2014, 16:36:20 Ann Campbell wrote:
|
|
FYI [~freddy.mallet], I followed, then reversed your advice and combined this with EQ_CHECK_FOR_OPERAND_NOT_COMPATIBLE_WITH_THIS instead since both rules look at symmetry.
|
|
|
|
=== on 17 Oct 2014, 10:07:04 Freddy Mallet wrote:
|
|
Ok @Ann and I would merge this rule with RSPEC-2161
|
|
|