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

Ruby: improve diagnostic messages #12216

Merged
merged 7 commits into from Mar 2, 2023
Merged

Conversation

aibaars
Copy link
Contributor

@aibaars aibaars commented Feb 16, 2023

No description provided.

For now we only report real parse errors and character encoding errors. Warnings about
unexpected or missing nodes in the AST are not reported. These are typically side effects
of earlier parse errors.
@github-actions github-actions bot added the Ruby label Feb 16, 2023
@aibaars aibaars force-pushed the diagnostics-2 branch 2 times, most recently from 01d0f29 to c4b0503 Compare February 17, 2023 14:40
@aibaars aibaars marked this pull request as ready for review February 20, 2023 09:00
@aibaars aibaars requested a review from a team as a code owner February 20, 2023 09:00
@aibaars aibaars requested review from asgerf and removed request for a team February 20, 2023 09:00
@erik-krogh erik-krogh requested review from erik-krogh and removed request for asgerf February 20, 2023 09:16
.severity(diagnostics::Severity::Error)
.location(self.path, start_line, start_column, end_line, end_column)
.text(&error_message)
.status_page(),
.message("unknown table type: {}", &[node.kind()]),
Copy link
Contributor

Choose a reason for hiding this comment

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

I notice an inconsistency in the capitalization of the message text - is there a convention or style guide to refer to about this?

@aibaars aibaars force-pushed the diagnostics-2 branch 2 times, most recently from cffdde3 to 91eba87 Compare February 28, 2023 12:31
subatoi
subatoi previously approved these changes Feb 28, 2023
Copy link
Contributor

@erik-krogh erik-krogh left a comment

Choose a reason for hiding this comment

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

I'm not that confortable in Rust, and I had to read up on what e.g. with_capacity does.

But everything I understand, I approve of :shipit:

You are doing more kinds of diagnostics messages than I had expected.

@aibaars aibaars merged commit 9e5ef9c into github:main Mar 2, 2023
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants