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

Use Ruff code and body as Diagnostic code and body #16

Merged
merged 1 commit into from
Oct 31, 2022

Conversation

charliermarsh
Copy link
Contributor

This more closely mirrors the behavior of other linters (i.e., the code appears in parentheses):

Screen Shot 2022-10-30 at 6 50 41 PM

@@ -13,8 +13,6 @@ use std::sync::Arc;
// TODO macro the unwrapping of state_handles

fn message_into_diagnostic(msg: Message) -> lsp_types::Diagnostic {
// As ruff currently doesn't support the span of the error,
// only have it span a single character
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe these comments are stale.

Copy link
Owner

Choose a reason for hiding this comment

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

Definitely stale, there's more stale comments around I'll look to clean up, most notably around TODOs

@@ -31,10 +29,9 @@ fn message_into_diagnostic(msg: Message) -> lsp_types::Diagnostic {
};
lsp_types::Range { start, end }
};
let code = Some(lsp_types::NumberOrString::String(msg.kind.body()));
Copy link
Owner

@Seamooo Seamooo Oct 31, 2022

Choose a reason for hiding this comment

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

Thanks for catching this! I'm pretty sure it's a regression issue from when the code interface changed

@Seamooo
Copy link
Owner

Seamooo commented Oct 31, 2022

Happy to merge after the small formatting fix

@Seamooo Seamooo merged commit 987dc34 into Seamooo:main Oct 31, 2022
@charliermarsh charliermarsh deleted the charlie/message branch October 31, 2022 13:59
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.

2 participants