redhat-developer / redhat-developer/vscode-yaml
Integers Parse Incorrectly
Open
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
Environment
- Windows
- Mac
- Linux
- other (please specify)
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
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