redhat-developer / redhat-developer/vscode-yaml
YAML version-based validation?
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 829
- Forks
- 260
- Avg merge
- 5h 43m
- Merged PRs (30d)
- 1
Description
Is your enhancement related to a problem? Please describe.
Current behavior:
---
key: Y # = true
This is a correct behavior according to YAML 1.1 where type definitions are outsourced to the type repository, which parses plain Y to boolean:

but it is no longer true in YAML 1.2 where some core types are built in the spec. Namely:

Describe the solution you would like
As two versions of spec disagree to each other, it'd be nice if the validator looks to the version directive when judging the plain values. Probably affected are bool, int, and float, for all of which v1.2 is more repressive in interpretation than v1.1.
---
key: Y # = true
%YAML 1.2
---
key: Y # = "Y"
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are identified in the issue. Start by reviewing the YAML 1.1 and 1.2 specifications linked in the report, then determine how version directives should affect bool, int, and float interpretation; done means the shown YAML 1.1 and 1.2 examples validate with their respective values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, yaml
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100