Propose a fix for removing unused constructors in the NoUnused.CustomTypeConstructors rule.
This is only done when the constructor is only used or referenced in the file it was defined in, because elm-review doesn't allow multi-file fixes.
What this autofix does:
Remove the constructor from the custom type
Remove any pattern match referencing the constructor
Turn any comparison with expressions referencing the constructor to a boolean
False for expressions like if thing == Unused
True for expressions like if thing /= Unused
Testing
I would like people to test this one out, since there's a higher chance than usual that I messed things up and that it leads to a compiler error.
I'd love it if people could try this one out, and see whether it causes any code to stop compiling or behaving differently.
Propose a fix for removing unused constructors in the
NoUnused.CustomTypeConstructors
rule.This is only done when the constructor is only used or referenced in the file it was defined in, because
elm-review
doesn't allow multi-file fixes.What this autofix does:
False
for expressions likeif thing == Unused
True
for expressions likeif thing /= Unused
Testing
I would like people to test this one out, since there's a higher chance than usual that I messed things up and that it leads to a compiler error. I'd love it if people could try this one out, and see whether it causes any code to stop compiling or behaving differently.