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

fix: PluginException: Range must be inside element being annotated #1109

Merged
merged 1 commit into from
Aug 11, 2023

Conversation

angelozerr
Copy link
Contributor

fix: PluginException: Range must be inside element being annotated

Fixes #1087

@sonarcloud
Copy link

sonarcloud bot commented Aug 11, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@angelozerr
Copy link
Contributor Author

This PR fixes the end offset before creating text range to return a null TextRange and ignore the wrong range diagnostic.

We need to check that because:

  • LSP client cannot trust the language server (if language server has some bugs)
  • The language server has perhaps reported a proper range but for an old document version

@fbricon fbricon merged commit 683e2e7 into redhat-developer:main Aug 11, 2023
10 of 11 checks passed
@fbricon
Copy link
Contributor

fbricon commented Aug 11, 2023

thanks @angelozerr

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

Successfully merging this pull request may close these issues.

PluginException: Range must be inside element being annotated
2 participants