Open jcoyne opened 1 month ago
We plan to remove this cop as it duplicates another cop.
As you point out, if the constant is fake, the correction should be to use double
.
Do you have issues with the other cop? We were discussing the removal of “string” as a valid enforced style. Do you happen to use it? Would you agree to this?
My major concern is that it's not auto-correctable. I don't think even unsafe autocorrect should be attempted. I do think prohibiting any non-constant should be flagged on instance_double though.
When I run the autocorrect for
RSpec/StringAsInstanceDoubleConstant
, it just changes the string to a constant. However, this constant doesn't exist. It would be better to just say it's not autocorrectable, or just make it adouble
(notinstance_double
)