mirror of
https://github.com/adrienverge/yamllint.git
synced 2025-02-25 18:55:20 -06:00
Specification of YAML ≤ 1.1 has 22 boolean values:
y | Y | n | N
yes | Yes | YES | no | No | NO
true | True | TRUE | false | False | FALSE
on | On | ON | off | Off | OFF
Whereas YAML 1.2 spec recognizes only 6 [^1]:
true | True | TRUE | false | False | FALSE
For documents that explicit state their YAML spec version at the top of
the document, let's adapt the list of forbidden values.
In the future, we should:
- implement a configuration option to declare the default YAML spec
version, e.g. `default-yaml-spec-version: 1.2`,
- consider making 1.2 the default in a future release (this would be a
slight breaking change, but yamllint always tried to be
1.2-compatible).
- consider adapting yamllint to other 1.1 vs. 1.2 differences [^2].
Solves: https://github.com/adrienverge/yamllint/issues/587
Related to: #559 #540 #430 #344 #247 #232 #158
[^1]: https://yaml.org/spec/1.2.2/#1032-tag-resolution
[^2]: https://yaml.org/spec/1.2.2/ext/changes/#changes-in-version-12-revision-120-2009-07-21