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

Do not raise unnecessarily during parsing #402

Merged
merged 1 commit into from
Jan 21, 2025
Merged

Do not raise unnecessarily during parsing #402

merged 1 commit into from
Jan 21, 2025

Conversation

Morriar
Copy link
Collaborator

@Morriar Morriar commented Jan 20, 2025

Since Shopify/spoom#611, we started using the RBI::Parser to parse actual Ruby files rather than just RBI files. This means the parser may encounter a more complex syntax than what we can expect in a RBI file and I noticed that we were raising a few RBI::ParseError for such cases.

While these errors may be useful to lint RBI files, the RBI parser is not a linter and shouldn't raise solely for this purpose. In most cases we can just no-op the case and continue without any issue.

This PR removes two cases that raise while we could have continued.

@Morriar Morriar added the bugfix Fix a bug label Jan 20, 2025
@Morriar Morriar self-assigned this Jan 20, 2025
@Morriar Morriar requested a review from a team as a code owner January 20, 2025 21:48
@Morriar Morriar merged commit b16c86e into main Jan 21, 2025
8 checks passed
@Morriar Morriar deleted the at-fix-parse branch January 21, 2025 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Fix a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants