[CodingStyle] Deprecate CountArrayToEmptyArrayComparisonRector - #8274
Conversation
|
Which coding standard tool would help me rewrite this? I have applied this rule plenty of times already. |
|
Goal of this rule was to gain performance, but there is none. It also removes the intent of count and implies general preference. This rule was very often skipped to avoid pointless cosmetic changes. |
|
I totally understand that people want to skip this rule but wouldn't it then be good enough to just remove it from the set and leave it in the code base for people who still want to use it (like me)? Now I need to copy the rule to my own code base instead of just reference it. |
|
Having it here in basic sets would suggest it's a best practise to do, which is not. This is why it fits better as custom rule, that are now very cheap to make. |
Deprecate
CountArrayToEmptyArrayComparisonRectorand remove it from the coding style level.The rule only swaps one equivalent check for another - no real win, it is a coding standard preference. Better left to a coding standard tool.