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

wrong line underlined as syntax errors #1095

Open
3 of 4 tasks
aep-sunlife opened this issue Feb 10, 2025 · 1 comment
Open
3 of 4 tasks

wrong line underlined as syntax errors #1095

aep-sunlife opened this issue Feb 10, 2025 · 1 comment

Comments

@aep-sunlife
Copy link

Describe the bug

When a YAML field is accidentally indented one space, where it should have been flush with the zeroth column, then VSCode sometimes produces error underlines the wrong line. Instead of highlighting that line, it highlights (commented) code above.

Expected Behavior

Fields indented too deep receive error underlines.

Current Behavior

(Commented) lines way up above get all the syntax checker attention, distracting users from the true root cause.

Steps to Reproduce

Image

Environment

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

By the way, some other editors like IntelliJ experience similar issues.

@RedCMD
Copy link

RedCMD commented Feb 13, 2025

can confirm

abc: string
# comment

 foo: bar

Image

I would think this is a upstream issue https://github.com/eemeli/yaml

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

No branches or pull requests

2 participants