Forbid having unused custom type constructors in a file.
rule : Lint.Rule.Rule
Forbid having unused custom type constructors in a file.
config =
[ NoUnused.CustomTypeConstructors.rule
]
Note that this does not report a constructor if it is exposed in the module, even if it is not used anywhere in the project. For a more accurate detection of unused constructors (and functions) across your project, you might want to check out elm-xref. You may still want to use this rule in your config so that you get notified of unused constructors earlier in your editor, rather than when running your tests or elm-xref.
module A exposing (a)
type MyType
= UsedType
| UnusedType -- Will get reported
a =
UsedType
module A exposing (ExposedType(..))
type MyType
= UsedType
a =
UsedType
type ExposedType
= A
| B
| C
-----------------------
module A exposing (..)
type ExposedType
= A
| B
| C