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: invalid endCharacter value in built in PHP validation provider #196166

Merged
merged 1 commit into from
Nov 1, 2023

Conversation

zobo
Copy link
Contributor

@zobo zobo commented Oct 21, 2023

The build in PHP validation provider sets the Diagnostics Range endCharacter value to Number.MAX_VALUE. This ends up being translated to 1.7976931348623157e+308 in LSP communication with other LSs in the textDocument/codeActionrequest.

There was already a discussion and a fix for related issues: #80288 (comment)

Some parts of the codebase use Number.MAX_SAFE_INTEGER and one uses a hardcoded max 32 bit integer value:

return { startLineNumber: startLine, startCharacter: 1, endLineNumber: startLine, endCharacter: 2 ** 31 - 1 }; // See https://github.com/microsoft/vscode/issues/80288#issuecomment-650636442 for discussion

image

Copy link
Member

@roblourens roblourens left a comment

Choose a reason for hiding this comment

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

Thank you!

@roblourens roblourens added this to the November 2023 milestone Nov 1, 2023
@roblourens roblourens merged commit 53249fc into microsoft:main Nov 1, 2023
6 checks passed
@zobo zobo deleted the fix-php-validation-range branch December 7, 2023 09:13
@github-actions github-actions bot locked and limited conversation to collaborators Dec 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants