Arkham/elm-review-no-missing-type-constructor/1.0.2

NOTE: the latest version is 1.0.3

NoMissingTypeConstructor

Imagine you have a type like this:

type Color
    = Red
    | Green
    | Blue

And 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.

Rule

rule : Rule

Usage

After adding elm-review to your project, import this rule to ReviewConfig.elm file and add it to the config.

Example configuration

import NoMissingTypeConstructor
import Review.Rule exposing (Rule)


config : List Rule
config =
    [ NoMissingTypeConstructor.rule ]