Imagine you have a type like this:
type Color
= Red
| Green
| BlueAnd a definition like this:
allColors : List Color
allColors =
[ Red, Green ]This elm-review rule will report a warning because allColors does not have all the possible constructors, since it's missing the Blue variant.
The following will also get reported*:
allColors : Nonempty Color
allColors =
Nonempty Red [ Green ]*The rule is built with mgold/elm-nonempty-list in mind but any nonempty list package should work so long as it has a Nonempty or NonEmpty type and the list is constructed with functionOrValue VariantA [ ... ]
Usage
After adding elm-review to your project, import this rule to
ReviewConfig.elmfile and add it to the config.Example configuration