redhat-developer / redhat-developer/vscode-yaml

Integers Parse Incorrectly

Open
#1,026 1 comment 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
829
Forks
260
Avg merge
5h 43m
Merged PRs (30d)
1

Description

Describe the bug

YAML extension incorrectly parses integers with underscores as strings. They are a verbose (readable) format for numbers.

Expected Behavior

1_000 interpreted as integer

Current Behavior

1_000 interpreted as string

Steps to Reproduce

integer_schema.json

{"type": "integer"}

create config:

# yaml-language-server: $schema=integer_schema.json
1_000

get error
image

Environment

  • Windows
  • Mac
  • Linux
  • other (please specify)

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

Start by reproducing the issue with integer_schema.json and the YAML configuration containing 1_000. Trace the YAML value through parsing and schema validation, then verify that 1_000 is accepted as an integer rather than reported as a string.

Written by the indexing model from the issue text.

Assessment

Tech stack
yaml
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.