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: Set unused tag for unused diagnostics #6378

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

ghostbuster91
Copy link
Collaborator

@ghostbuster91 ghostbuster91 commented May 5, 2024

waiting for: scala/scala3#19780

For now this will only work for scala3 as scala2 does not emit errorCodes.
Regex based support for this feature in scala2 will be added as a follow-up.

cc @rochala

@ghostbuster91 ghostbuster91 marked this pull request as ready for review May 30, 2024 09:24
object DiagnosticCodes {
val Unused: Int = 198

def isEqual(lspCode: Either[String, Integer], other: Int): Boolean = {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

thought: I didn't find any additional info when it can be one or the other and if both should be treated as diagnostic codes.

The spec says:

/**
	 * The diagnostic's code, which might appear in the user interface.
	 */
	code?: [integer](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#integer) | string;

https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#diagnostic

@rochala rochala merged commit 0c81592 into scalameta:main Jun 3, 2024
24 checks passed
@ghostbuster91 ghostbuster91 deleted the unused-diag branch June 3, 2024 11:46
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.

None yet

2 participants