redhat-developer / redhat-developer/vscode-yaml

YAML version-based validation?

Open
#380 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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:
image

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

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.