Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flakiness in validator: Incorrect type. Expected "string" #671

Closed
1 of 4 tasks
Ark-kun opened this issue Jan 6, 2022 · 0 comments · Fixed by redhat-developer/yaml-language-server#645
Closed
1 of 4 tasks
Assignees
Labels
Milestone

Comments

@Ark-kun
Copy link

Ark-kun commented Jan 6, 2022

Describe the bug

When adding values to an array, the validator often starts highlighting the new string and claiming Incorrect type. Expected "string".
The issue goes away when doing some insignificant changes in any part of the file (e.g. comments) and re-saving the file.

Expected Behavior

I expect the validator to always recognize strings as strings.

Current Behavior

The validator sometimes does not recognize strings as strings.

Steps to Reproduce

  1. Create file named component.yaml
  2. paste the following YAML into the file:
implementation:
  container:
    image: alpine
    command:
    - aaa
    - bbb
    - ccc
  1. Put cursor somewhere after one of the array items (e.g. bbb).
  2. Press Enter to start a new line
  3. Type - ddd to add a new array item, same as the others
  4. Notice the semi-persistent error complaining about the just added ddd item. (See screenshot)

Environment

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

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants