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

feat: add better YAML syntax error messages #2931

Merged
merged 4 commits into from
Jul 12, 2023
Merged

Conversation

char0n
Copy link
Member

@char0n char0n commented Jul 11, 2023

Refs #2914
Refs #2889


Assigning a constant error message is happening as late as possible - during the YAML AST -> ApiDOM syntactic analysis.

The error message format is consistent with the established error message formats:

  1. (Error <value>)
  2. (Unexpected <value>)

Tests in apidom-ls have been adapted.

@char0n char0n self-assigned this Jul 11, 2023
@char0n char0n added enhancement New feature or request ApiDOM YAML labels Jul 11, 2023
@damian-polewski-sb damian-polewski-sb self-assigned this Jul 12, 2023
Copy link
Member Author

@char0n char0n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@damian-polewski-sb please have a look at my suggestions to tests and if you agree please amend the rest of the tests with the suggestions.

@damian-polewski-sb
Copy link
Contributor

@char0n Thanks for the suggestions! I added them in the latest commit.

@char0n char0n merged commit 5a1d14a into main Jul 12, 2023
7 checks passed
@char0n char0n deleted the char0n/yaml-syntax-errors branch July 12, 2023 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ApiDOM enhancement New feature or request YAML
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants