Use this rule to forbid non-explicitly typed truthy values other than true and false, for
example YES, False and off.
This can be useful to prevent surprises from YAML parsers transforming [yes, FALSE, Off] into
[true, false, false] or {y: 1, yes: 2, on: 3, true: 4, True: 5} into {y: 1, true: 5}.
Examples
When enabled the following code snippet would PASS:
boolean: true
object: {"True": 1, 1: "True"}
"yes": 1
"on": 2
"True": 3
explicit:
string1: !!str True
string2: !!str yes
string3: !!str off
encoded: !!binary |
True
OFF
pad== # this decodes as 'N\xbb\x9e8Qii'
boolean1: !!bool true
boolean2: !!bool "false"
boolean3: !!bool FALSE
boolean4: !!bool True
boolean5: !!bool off
boolean6: !!bool NO
the following code snippets would FAIL:
object: {True: 1, 1: True}
yes: 1
on: 2
True: 3