typedEnum
typedEnum
will check each Enum definition, and will
ensure that the type defined for the enum
, actually matches the values supplied.
Example ruleset configuration
typed-enum:
description: "Enum values must respect the specified type"
type: "validation"
recommended: true
severity: "warn"
given: "$"
then:
function: "typedEnum"
The function is used by the typed-enum Rule