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

ambiguous parse error messages #1066

Open
aep-sunlife opened this issue Feb 10, 2025 · 0 comments
Open

ambiguous parse error messages #1066

aep-sunlife opened this issue Feb 10, 2025 · 0 comments

Comments

@aep-sunlife
Copy link

Hi,

When a user provides a YAML file with invalid syntax, then I expect go-yaml to present very clear, direct error messages about the nature of the syntax error. However, in practice, I am seeing vague, misleading messages.

Image

Error from go-yaml:

$ snack
2025/02/10 10:19:37 yaml: line 2: did not find expected key
  • The line number indicated is confusing. The actual problem occurs with some keys indented at a single space column, not a random column after the document opening marker.
  • The error says "did not find expected key" but fails to indicate which keys were expected
  • The error omits the fact that a single space character was encountered where keys were expected
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

1 participant