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

Default diagnostic severity on schema validation #251

Open
kelvien opened this issue Sep 26, 2024 · 1 comment
Open

Default diagnostic severity on schema validation #251

kelvien opened this issue Sep 26, 2024 · 1 comment

Comments

@kelvien
Copy link

kelvien commented Sep 26, 2024

I notice that monaco-yaml shows errors as hints (shown orange/yellow) on the playground.
When I check the severity level using monaco.editor.getModelMarkers({}), it's showing that the severity is 4
image
And looking at the enums of DiagnosticSeverity, 4 is hint
image
Is it possible to change it to error so that it's underlined with red to make the error more apparent?

@remcohaszing
Copy link
Owner

You’re confusing the Monaco editor types with the LSP types. The severity you’re seeing is indeed 4, but that matches MarkerSeverity.Warning, not Hint. This is indeed displayed as a yellow squiggly line.

The goal of this project is to bring the YAML language service to Monaco editor, not to add custom logic on top of that. So in that sense I wouldn’t want to implement that in monaco-yaml. However, I do notice that VSCode does use an error severity for JSON schema violations. I’m not sure what’s going on.

I’m currently very busy myself, but I welcome an investigation on this.

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